File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export { AxiosResponseFactory } from "andculturecode-javascript-testing" ;
2+ export * from "./result-error-record-factory" ;
3+ export * from "./result-record-factory" ;
24export * from "./stub-resource-record-factory" ;
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ describe("do-try.ts", () => {
2929 // since jest is using node promises, it fails the test as soon as the error
3030 // is thrown if we actually await the promise. expect.assertions(5) waits for
3131 // 5 assertions to be called.
32- expect . assertions ( 5 ) ;
3332 Do . try ( workload ) . catch (
3433 ( result ?: ResultRecord < any > , error ?: any ) => {
3534 expect ( result ) . not . toBeUndefined ( ) ;
@@ -39,6 +38,7 @@ describe("do-try.ts", () => {
3938 expect ( result ! . errors ) . toHaveLength ( 1 ) ;
4039 }
4140 ) ;
41+ expect . assertions ( 5 ) ;
4242 } ) ;
4343
4444 it ( "When passed an async method and a Javascript error occurs, then passes along regular error" , async ( ) => {
@@ -48,14 +48,14 @@ describe("do-try.ts", () => {
4848 } ;
4949
5050 // Act & Assert
51- expect . assertions ( 3 ) ;
5251 Do . try ( workload ) . catch (
5352 ( result ?: ResultRecord < any > , error ?: any ) => {
5453 expect ( error ) . not . toBeNull ( ) ;
5554 expect ( error ) . not . toBeUndefined ( ) ;
5655 expect ( result ) . toBeUndefined ( ) ;
5756 }
5857 ) ;
58+ expect . assertions ( 3 ) ;
5959 } ) ;
6060
6161 it ( "When no errors occur, then catch handler is never called" , async ( ) => {
You can’t perform that action at this time.
0 commit comments