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: update assert error messages to be more descriptive #16035

Closed
Changes from all commits
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
10 changes: 5 additions & 5 deletions test/parallel/test-vm-preserves-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const code = 'Object.getOwnPropertyDescriptor(this, "prop")';
const res = vm.runInContext(code, o, 'test');

assert(res);
assert.strictEqual(typeof res, 'object');
assert.strictEqual(res.value, 'val');
assert.strictEqual(res.configurable, false, 'should not be configurable');
assert.strictEqual(res.enumerable, false, 'should not be enumerable');
assert.strictEqual(res.writable, false, 'should not be writable');
assert.strictEqual(typeof res, 'object', `Expected vm.runInContext() to return an object not a(n) ${typeof res}.`);
assert.strictEqual(res.value, 'val', `Expected res.value to equal 'val', got '${res.value}' instead.`);
assert.strictEqual(res.configurable, false, `Expected res.configurable to equal false, got ${res.configurable} instead.`);
assert.strictEqual(res.enumerable, false, `Expected res.enumerable to equal false, got ${res.enumerable} instead.`);
assert.strictEqual(res.writable, false, `Expected res.writable to equal false, got ${res.writable} instead.`);
Copy link
Member

@BridgeAR BridgeAR Oct 6, 2017

Choose a reason for hiding this comment

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

The line length is to long and has to be fixed before landing.

Copy link
Member

Choose a reason for hiding this comment

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

I would actually just remove the message.