Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove messages for assert #16814

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: format the comment and separate blocks
  • Loading branch information
ka3e committed Nov 7, 2017
commit c18c0c0cc629b3462d0d7bf5d7665de112face6b
8 changes: 4 additions & 4 deletions test/addons-napi/test_promise/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use strict';

const common = require('../../common');
const assert = require('assert');

// Testing api calls for promises
// This tests the promise-related n-api calls

const assert = require('assert');
const test_promise = require(`./build/${common.buildType}/test_promise`);

// A resolution
Expand Down Expand Up @@ -40,10 +41,9 @@ const test_promise = require(`./build/${common.buildType}/test_promise`);
}),
common.mustNotCall());
test_promise.concludeCurrentPromise(Promise.resolve('chained answer'), true);

assert.strictEqual(test_promise.isPromise(promise), true);
}

assert.strictEqual(test_promise.isPromise(test_promise.createPromise()), true);
Copy link
Member

@Trott Trott Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kkwoker @gabrielschulhof Any idea if this changes the test in a significant/important way? Specifically, I'm not sure if promise having a .then() already attached is significant to this assertion or not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Trott I don't think it's significant.

assert.strictEqual(test_promise.isPromise(Promise.reject(-1)), true);
assert.strictEqual(test_promise.isPromise(2.4), false);
assert.strictEqual(test_promise.isPromise('I promise!'), false);
Expand Down