Skip to content

Commit 6a2c166

Browse files
committed
patch mongosh version test
1 parent 876667c commit 6a2c166

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/shell-api/src/shell-api.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { bson } from '@mongosh/service-provider-core';
2323
import { EventEmitter } from 'events';
2424
import type { EvaluationListener } from './shell-instance-state';
2525
import ShellInstanceState from './shell-instance-state';
26+
import { MONGOSH_VERSION } from './mongosh-version';
2627

2728
const b641234 = 'MTIzNA==';
2829
const schemaMap = {
@@ -513,7 +514,7 @@ describe('ShellApi', function () {
513514
describe('version', function () {
514515
it('returns a string for the version', function () {
515516
const version = instanceState.shellApi.version();
516-
const expected = require('../package.json').version;
517+
const expected = MONGOSH_VERSION;
517518
expect(version).to.be.a('string');
518519
expect(version).to.equal(expected);
519520
});
@@ -650,7 +651,7 @@ describe('ShellApi', function () {
650651
describe('version', function () {
651652
it('returns a string for the version', function () {
652653
const version = instanceState.context.version();
653-
const expected = require('../package.json').version;
654+
const expected = MONGOSH_VERSION;
654655
expect(version).to.be.a('string');
655656
expect(version).to.equal(expected);
656657
});

0 commit comments

Comments
 (0)