@@ -23,6 +23,7 @@ import { bson } from '@mongosh/service-provider-core';
2323import { EventEmitter } from 'events' ;
2424import type { EvaluationListener } from './shell-instance-state' ;
2525import ShellInstanceState from './shell-instance-state' ;
26+ import { MONGOSH_VERSION } from './mongosh-version' ;
2627
2728const b641234 = 'MTIzNA==' ;
2829const 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