Skip to content
Merged
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
8 changes: 4 additions & 4 deletions doc/api/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,8 @@ sql.run`INSERT INTO users VALUES (1, 'Alice')`;
sql.run`INSERT INTO users VALUES (2, 'Bob')`;

// Using the 'get' method to retrieve a single row.
const id = 1;
const user = sql.get`SELECT * FROM users WHERE id = ${id}`;
const name = 'Alice';
const user = sql.get`SELECT * FROM users WHERE name = ${name}`;
console.log(user); // { id: 1, name: 'Alice' }

// Using the 'all' method to retrieve all rows.
Expand All @@ -577,8 +577,8 @@ sql.run`INSERT INTO users VALUES (1, 'Alice')`;
sql.run`INSERT INTO users VALUES (2, 'Bob')`;

// Using the 'get' method to retrieve a single row.
const id = 1;
const user = sql.get`SELECT * FROM users WHERE id = ${id}`;
const name = 'Alice';
const user = sql.get`SELECT * FROM users WHERE name = ${name}`;
console.log(user); // { id: 1, name: 'Alice' }

// Using the 'all' method to retrieve all rows.
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-max-old-space-size-percentage.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ invalidPercentages.forEach((input) => {
`--max-old-space-size-percentage=${input[0]}`,
], { stdio: ['pipe', 'pipe', 'pipe'] });
assert.notStrictEqual(result.status, 0, `Expected non-zero exit for invalid input ${input[0]}`);
assert(input[1].test(result.stderr.toString()), `Unexpected error message for invalid input ${input[0]}`);
assert.match(result.stderr.toString(), input[1]);
});

// Test NODE_OPTIONS with valid percentages
Expand All @@ -61,7 +61,7 @@ invalidPercentages.forEach((input) => {
env: { ...process.env, NODE_OPTIONS: `--max-old-space-size-percentage=${input[0]}` }
});
assert.notStrictEqual(result.status, 0, `NODE_OPTIONS: Expected non-zero exit for invalid input ${input[0]}`);
assert(input[1].test(result.stderr.toString()), `NODE_OPTIONS: Unexpected error message for invalid input ${input[0]}`);
assert.match(result.stderr.toString(), input[1]);
});

// Test percentage calculation validation
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-junk-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ server.listen(0, common.mustCall(function() {
expectedErrorMessage = new RegExp('packet length too long');
};
req.once('error', common.mustCall(function(err) {
assert(expectedErrorMessage.test(err.message));
assert.match(err.message, expectedErrorMessage);
server.close();
}));
}));
Loading