local W=require("\064\068\101\118\080\097\099\107\097\103\101\115\047\074\101\115\116\071\108\111\098\097\108\115")local z=W.test local g=W.expect local Q=require("\046\046\047\105\110\105\116")local s=Q.Future z("\105\110\115\112\101\099\116\079\107",function()g.assertions(3)local W=s.new(function()return"\097","\098","\099"end)W:inspectOk(function(...)(g({...})).toEqual({"\097";"\098";"\099"})end)local z=W:await();(g(z:isOk())).toBe(true)local Q={z:unwrapOk()};(g(Q)).toEqual({"\097","\098";"\099"})end)
local JestGlobals = require("@DevPackages/JestGlobals")

local test = JestGlobals.test
local expect = JestGlobals.expect

local Futures = require("../init")
local Future = Futures.Future

test("inspectOk", function()
	expect.assertions(3)

	local myFuture = Future.new(function()
		return "a", "b", "c"
	end)

	myFuture:inspectOk(function(...)
		expect({ ... }).toEqual({ "a", "b", "c" })
	end)

	local result = myFuture:await()
	expect(result:isOk()).toBe(true)

	local values = { result:unwrapOk() }

	expect(values).toEqual({ "a", "b", "c" })
end)
