mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 23:50:03 +00:00
make promisify test more clear
This commit is contained in:
parent
01499e5b7f
commit
57d98880b5
1 changed files with 4 additions and 2 deletions
|
@ -699,9 +699,11 @@ return function()
|
||||||
end
|
end
|
||||||
|
|
||||||
local promisified = Promise.promisify(test)
|
local promisified = Promise.promisify(test)
|
||||||
local status, result = promisified(1):awaitStatus()
|
local promise = promisified(1)
|
||||||
|
local success, result = promise:_unwrap()
|
||||||
|
|
||||||
expect(status).to.equal(Promise.Status.Resolved)
|
expect(success).to.equal(true)
|
||||||
|
expect(promise:getStatus()).to.equal(Promise.Status.Resolved)
|
||||||
expect(result).to.equal(2)
|
expect(result).to.equal(2)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue