Unit Tests
#start the test stage
npx slnodejs start --token $SL_TOKEN --buildsessionid $BUILDSESSIONID --teststage "Unit Tests"
#run the unit tests
npm run test
#upload the Junit XML report
npx slnodejs uploadReports --token $SL_TOKEN --buildsessionid $BUILDSESSIONID --reportFile "path/to/junit.xml"
#upload the coverage report
npx slnodejs nycReport --token $SL_TOKEN --buildsessionid $BUILDSESSIONID --report "path/to/coverage/coverage-final.json"
#end the test stage
npx slnodejs end --token $SL_TOKEN --buildsessionid $BUILDSESSIONIDLast updated
Was this helpful?

