@@ -8,18 +8,18 @@ const path = require('path')
88const Paths = require ( './lib/paths' )
99const { createHash } = require ( 'crypto' )
1010const logger = require ( './lib/logger' )
11- const { createBundle, realDigest } = require ( './lib/bundle' )
11+ const { createBundle, packageDigest } = require ( './lib/bundle' )
1212const npm = require ( './lib/npm' )
1313
14- const configFile = path . resolve ( __dirname , '..' , 'e2e' , 'jest.config.js' )
14+ const configFile = path . join ( Paths . e2eRootDir , 'jest.config.js' )
15+
1516let parentArgs = process . argv . slice ( 2 )
1617if ( parentArgs . includes ( '--coverage' ) ) {
1718 logger . warn (
1819 'Coverages cannot be activated for e2e tests (but can in each e2e test).'
1920 )
2021 parentArgs = parentArgs . filter ( a => a !== '--coverage' )
2122}
22- if ( ! parentArgs . includes ( '--verbose' ) ) parentArgs . push ( '--verbose' )
2323
2424function getDirectories ( rootDir ) {
2525 return fs . readdirSync ( rootDir ) . filter ( function ( file ) {
@@ -30,7 +30,7 @@ function getDirectories(rootDir) {
3030function sha1 ( ...data ) {
3131 const hash = createHash ( 'sha1' )
3232 data . forEach ( item => hash . update ( item ) )
33- return hash . digest ( 'base64 ' ) . toString ( )
33+ return hash . digest ( 'hex ' ) . toString ( )
3434}
3535
3636function log ( ...msg ) {
@@ -48,8 +48,8 @@ function setupE2e() {
4848
4949 // get the hash of the bundle (to know if we should install it again or not)
5050 // we need to compute it ourselfs as the npm pack creates different tgz even tho content has not changed
51- const bundleHash = realDigest ( bundle )
52- log ( 'bundled ts-jest digest:' , bundleHash )
51+ const bundleHash = packageDigest ( bundle )
52+ log ( 'ts-jest digest:' , bundleHash )
5353
5454 // ensure directory exists before copying over
5555 fs . mkdirpSync ( Paths . e2eWorkTemplatesDir )
0 commit comments