File tree Expand file tree Collapse file tree 7 files changed +16
-31
lines changed
Expand file tree Collapse file tree 7 files changed +16
-31
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import main from " @/bin/typescript-demo-lib" ;
1+ import main from ' @/bin/typescript-demo-lib' ;
22
33describe ( 'main' , ( ) => {
4-
54 test ( 'main takes synthetic parameters' , ( ) => {
6-
75 // jest can also "spy on" the console object
86 // and then you can test on stdout
9- expect ( main ( [ "1" ] ) ) . toEqual ( 0 ) ;
10-
7+ expect ( main ( [ '1' ] ) ) . toEqual ( 0 ) ;
118 } ) ;
12-
139} ) ;
Original file line number Diff line number Diff line change 1- async function setup ( ) {
1+ async function setup ( ) {
22 console . log ( 'GLOBAL SETUP' ) ;
33}
44
Original file line number Diff line number Diff line change 1- async function teardown ( ) {
1+ async function teardown ( ) {
22 console . log ( 'GLOBAL TEARDOWN' ) ;
33}
44
Original file line number Diff line number Diff line change 1- import { Library } from "@" ;
1+ import { Library } from '@' ;
22
33describe ( 'index' , ( ) => {
4-
54 test ( 'some arbitrary test' , ( ) => {
65 const library = new Library ( 'some param' ) ;
76 expect ( library ?. someParam ) . toEqual ( 'some param' ) ;
87 } ) ;
9-
108} ) ;
Original file line number Diff line number Diff line change 1- import Library from " @/lib/Library" ;
1+ import Library from ' @/lib/Library' ;
22
33declare global {
44 namespace NodeJS {
55 interface Global {
6- projectDir : string ,
7- testDir : string
6+ projectDir : string ;
7+ testDir : string ;
88 }
99 }
1010}
1111
1212describe ( 'Library class' , ( ) => {
13-
1413 let library : Library | null ;
1514
16- beforeAll ( async done => {
15+ beforeAll ( async ( done ) => {
1716 library = new Library ( 'some param' ) ;
18- done ( ) ;
19- } )
17+ done ( ) ;
18+ } ) ;
2019
21- afterAll ( ( ) => {
22- library = null ;
23- } )
20+ afterAll ( ( ) => {
21+ library = null ;
22+ } ) ;
2423
2524 test ( 'some arbitrary test' , ( ) => {
2625 expect ( library ?. someParam ) . toEqual ( 'some param' ) ;
2726 } ) ;
28-
2927} ) ;
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import path from 'path';
33declare global {
44 namespace NodeJS {
55 interface Global {
6- projectDir : string ,
7- testDir : string
6+ projectDir : string ;
7+ testDir : string ;
88 }
99 }
1010}
You can’t perform that action at this time.
0 commit comments