@@ -42,6 +42,12 @@ describe('Task', function () {
4242 context ( '#run()' , function ( ) {
4343 for ( const test of testTable ) {
4444 context ( `${ test . operation } with library specifier: ${ test . library } ` , function ( ) {
45+ let task ;
46+
47+ beforeEach ( function ( ) {
48+ task = new Task ( test ) ;
49+ } ) ;
50+
4551 it ( 'completes successfully' , async function ( ) {
4652 if (
4753 Number ( process . versions . node . split ( '.' ) [ 0 ] ) >= 20 &&
@@ -50,14 +56,18 @@ describe('Task', function () {
5056 console . log ( 'Skipping installing bson-ext via git tag on Node 20' ) ;
5157 this . skip ( ) ;
5258 }
53- const task = new Task ( test ) ;
5459
5560 await task . run ( ) ;
5661 for ( const child of task . children ) {
5762 expect ( child . exitCode ) . to . not . be . null ;
5863 expect ( child . exitCode ) . to . equal ( 0 ) ;
5964 }
6065 } ) ;
66+
67+ it ( 'strips the tag or commit from the test name' , function ( ) {
68+ expect ( task . testName ) . to . not . include ( test . library ) ;
69+ expect ( task . testName ) . to . match ( / b s o n | b s o n - e x t / ) ;
70+ } ) ;
6171 } ) ;
6272 }
6373
@@ -138,7 +148,7 @@ describe('Task', function () {
138148 } ) ;
139149
140150 it ( 'returns results as an object' , async function ( ) {
141- expect ( results . info ) . to . haveOwnProperty ( 'test_name' , task . taskName ) ;
151+ expect ( results . info ) . to . haveOwnProperty ( 'test_name' , task . testName ) ;
142152 expect ( results . info ) . to . haveOwnProperty ( 'args' ) ;
143153 } ) ;
144154
@@ -240,12 +250,12 @@ describe('Task', function () {
240250 options : { promoteLongs : true }
241251 } ) ;
242252
243- expectedFileName = `${ task . taskName } .json` ;
253+ expectedFileName = `${ task . testName } .json` ;
244254 if ( await exists ( expectedFileName ) ) await rm ( expectedFileName ) ;
245255 } ) ;
246256
247257 after ( async ( ) => {
248- expectedFileName = `${ task . taskName } .json` ;
258+ expectedFileName = `${ task . testName } .json` ;
249259 if ( await exists ( expectedFileName ) ) await rm ( expectedFileName ) ;
250260 } ) ;
251261
0 commit comments