Skip to content

Commit

Permalink
fixup: lint and other test fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Oct 19, 2023
1 parent 71026a1 commit 4f0e884
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/cli-repl/src/cli-repl.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ describe('CliRepl', function () {
cliRepl,
await testServer.connectionString()
);
expect(output).to.match(/Inserted: ObjectId\("[a-z0-9]{24}"\)/);
expect(output).to.match(/Inserted: ObjectId\('[a-z0-9]{24}'\)/);
expect(exitCode).to.equal(0);
});

Expand All @@ -1596,7 +1596,7 @@ describe('CliRepl', function () {
cliRepl,
await testServer.connectionString()
);
expect(output).to.match(/Inserted: ObjectId\("[a-z0-9]{24}"\)/);
expect(output).to.match(/Inserted: ObjectId\('[a-z0-9]{24}'\)/);
expect(exitCode).to.equal(0);
});

Expand All @@ -1614,7 +1614,7 @@ describe('CliRepl', function () {

cliRepl = new CliRepl(cliReplOptions);
await cliRepl.start(await testServer.connectionString(), {});
expect(output).to.match(/Inserted: ObjectId\("[a-z0-9]{24}"\)/);
expect(output).to.match(/Inserted: ObjectId\('[a-z0-9]{24}'\)/);
expect(exitCode).to.equal(null);

input.write(
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-repl/src/format-output.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for (const colors of [false, true]) {
context('when the result is a date', function () {
it('returns the inspection', function () {
expect(format({ value: new Date(1234567890000) })).to.include(
'ISODate("2009-02-13T23:31:30.000Z")'
"ISODate('2009-02-13T23:31:30.000Z')"
);
expect(format({ value: new Date(NaN) })).to.include('Invalid Date');
});
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-repl/src/mongosh-repl.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ describe('MongoshNodeRepl', function () {
it('prints Date objects using the ISODate constructor variant', async function () {
input.write('new Date(1620143373000)\n');
await waitEval(bus);
expect(output).to.include('ISODate("2021-05-04T15:49:33.000Z")');
expect(output).to.include("ISODate('2021-05-04T15:49:33.000Z')");
});

it('handles a long series of errors', async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ describe('worker', function () {

expect(evalListener.onPrint).to.have.been.calledWith([
{
printable: 'ObjectId("62a209b0c7dc31e23ab9da45")',
printable: "ObjectId('62a209b0c7dc31e23ab9da45')",
source: undefined,
type: 'InspectResult',
},
Expand Down
1 change: 0 additions & 1 deletion packages/service-provider-core/src/printable-bson.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { bson as BSON } from './bson-export';
import { inspect } from 'util';
const inspectCustom = Symbol.for('nodejs.util.inspect.custom');
type BSONClassKey = (typeof BSON)[Exclude<
keyof typeof BSON,
Expand Down

0 comments on commit 4f0e884

Please sign in to comment.