@@ -15,7 +15,7 @@ import * as path from 'path';
1515
1616import * as defaults from '../defaults' ;
1717import { BenchmarkSpec } from '../types' ;
18- import { hashStrings , makeServerPlans , ServerPlan } from '../versions' ;
18+ import { hashStrings , makeServerPlans , ServerPlan , tachometerVersion } from '../versions' ;
1919import { testData } from './test_helpers' ;
2020
2121const defaultBrowser = {
@@ -119,8 +119,14 @@ suite('versions', () => {
119119 const { plans : actualPlans , gitInstalls : actualGitInstalls } =
120120 await makeServerPlans ( testData , tempDir , specs ) ;
121121
122- const v1Hash = hashStrings ( path . join ( testData , 'mylib' ) , 'v1' ) ;
123- const v2Hash = hashStrings ( path . join ( testData , 'mylib' ) , 'v2' ) ;
122+ const v1Hash = hashStrings (
123+ tachometerVersion ,
124+ path . join ( testData , 'mylib' , 'package.json' ) ,
125+ JSON . stringify ( [ [ 'mylib' , '1.0.0' ] , [ 'otherlib' , '0.0.0' ] ] ) ) ;
126+ const v2Hash = hashStrings (
127+ tachometerVersion ,
128+ path . join ( testData , 'mylib' , 'package.json' ) ,
129+ JSON . stringify ( [ [ 'mylib' , '2.0.0' ] , [ 'otherlib' , '0.0.0' ] ] ) ) ;
124130
125131 const expectedPlans : ServerPlan [ ] = [
126132 {
@@ -217,7 +223,10 @@ suite('versions', () => {
217223 const { plans : actualPlans , gitInstalls : actualGitInstalls } =
218224 await makeServerPlans ( path . join ( testData , 'mylib' ) , tempDir , specs ) ;
219225
220- const v1Hash = hashStrings ( path . join ( testData , 'mylib' ) , 'v1' ) ;
226+ const v1Hash = hashStrings (
227+ tachometerVersion ,
228+ path . join ( testData , 'mylib' , 'package.json' ) ,
229+ JSON . stringify ( [ [ 'mylib' , '1.0.0' ] , [ 'otherlib' , '0.0.0' ] ] ) ) ;
221230 const expectedPlans : ServerPlan [ ] = [
222231 {
223232 specs : [ specs [ 0 ] ] ,
0 commit comments