File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 "packages" : [
44 " packages/*"
55 ],
6- "version" : " 0.4.21 "
6+ "version" : " 0.5.0 "
77}
Original file line number Diff line number Diff line change 11{
22 "name" : " @hayspec/cli" ,
3- "version" : " 0.4.21 " ,
3+ "version" : " 0.5.0 " ,
44 "description" : " CLI for Hayspec framework." ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
6464 "typescript" : " ^3.0.1"
6565 },
6666 "dependencies" : {
67- "@hayspec/init" : " ^0.4.21 " ,
68- "@hayspec/reporter" : " ^0.4.21 " ,
69- "@hayspec/runner" : " ^0.4.21 " ,
70- "@hayspec/spec" : " ^0.4.21 " ,
67+ "@hayspec/init" : " ^0.5.0 " ,
68+ "@hayspec/reporter" : " ^0.5.0 " ,
69+ "@hayspec/runner" : " ^0.5.0 " ,
70+ "@hayspec/spec" : " ^0.5.0 " ,
7171 "inquirer" : " ^6.0.0" ,
7272 "yargs" : " ^11.0.0"
7373 },
Original file line number Diff line number Diff line change 11{
22 "name" : " @hayspec/init" ,
3- "version" : " 0.4.21 " ,
3+ "version" : " 0.5.0 " ,
44 "description" : " Project generator for Hayspec framework." ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @hayspec/reporter" ,
3- "version" : " 0.4.21 " ,
3+ "version" : " 0.5.0 " ,
44 "description" : " Reporter for Hayspec framework." ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
6565 "typescript" : " ^3.0.1"
6666 },
6767 "dependencies" : {
68- "@hayspec/spec" : " ^0.4.21 " ,
68+ "@hayspec/spec" : " ^0.5.0 " ,
6969 "chalk" : " ^2.4.1"
7070 },
7171 "gitHead" : " 03535c698ebd35ec94c63869f18cdde2380f739f"
Original file line number Diff line number Diff line change 11{
22 "name" : " @hayspec/runner" ,
3- "version" : " 0.4.21 " ,
3+ "version" : " 0.5.0 " ,
44 "description" : " Tests runner for Hayspec framework." ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
6565 "typescript" : " ^3.0.1"
6666 },
6767 "dependencies" : {
68- "@hayspec/spec" : " ^0.4.21 " ,
68+ "@hayspec/spec" : " ^0.5.0 " ,
6969 "fast-glob" : " ^2.2.2"
7070 },
7171 "gitHead" : " 03535c698ebd35ec94c63869f18cdde2380f739f"
Original file line number Diff line number Diff line change @@ -62,13 +62,15 @@ export class Runner {
6262
6363 /**
6464 *
65+ * NOTE: Due to different NPM package managers, the `instanceof` check my be
66+ * inconsistent thus the function checks for presence of the `test` method.
6567 */
6668 protected async loadSpec ( file : string ) {
6769 const spec = require ( file ) ;
6870
69- if ( spec instanceof Spec ) {
71+ if ( typeof spec . test !== 'undefined' ) {
7072 this . results . push ( { file, spec } ) ;
71- } else if ( spec . default instanceof Spec ) {
73+ } else if ( spec . default && typeof spec . default . test !== 'undefined' ) {
7274 this . results . push ( { file, spec : spec . default } ) ;
7375 }
7476 }
Original file line number Diff line number Diff line change 11{
22 "name" : " @hayspec/spec" ,
3- "version" : " 0.4.21 " ,
3+ "version" : " 0.5.0 " ,
44 "description" : " Core logic for Hayspec framework." ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments