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: check for the correct strict equal arguments order #24752

Closed
Closed
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions test/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ rules:
message: "The first argument should be the `actual`, not the `expected` value."
- selector: "CallExpression[callee.object.name='assert'][callee.property.name='deepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression'])"
message: "The first argument should be the `actual`, not the `expected` value."
# TODO: Activate the `strictEqual` rule as soon as it produces less churn.
# - selector: "CallExpression[callee.object.name='assert'][callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression'])"
# message: "The first argument should be the `actual`, not the `expected` value."
- selector: "CallExpression[callee.object.name='assert'][callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression'])"
message: "The first argument should be the `actual`, not the `expected` value."
# Global scoped methods and vars
globals:
WebAssembly: false
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-http-blank-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ const net = require('net');
const server = http.createServer(common.mustCall((req, res) => {
assert.strictEqual(req.method, 'GET');
assert.strictEqual(req.url, '/blah');
assert.deepStrictEqual({
assert.deepStrictEqual(req.headers, {
host: 'example.org:443',
origin: 'http://example.org',
cookie: ''
}, req.headers);
});
}));


Expand All @@ -52,7 +52,7 @@ server.listen(0, common.mustCall(() => {
received += data.toString();
}));
c.on('end', common.mustCall(() => {
assert.strictEqual('HTTP/1.1 400 Bad Request\r\n\r\n', received);
assert.strictEqual(received, 'HTTP/1.1 400 Bad Request\r\n\r\n');
c.end();
}));
c.on('close', common.mustCall(() => server.close()));
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-process-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if (process.argv[2] === 'you-are-the-child') {
// delete should return true except for non-configurable properties
// https://github.com/nodejs/node/issues/7960
delete process.env.NON_EXISTING_VARIABLE;
assert.strictEqual(true, delete process.env.NON_EXISTING_VARIABLE);
assert(delete process.env.NON_EXISTING_VARIABLE);

/* For the moment we are not going to support setting the timezone via the
* environment variables. The problem is that various V8 platform backends
Expand Down