Skip to content

Commit

Permalink
Update test snapshots and fix failed test
Browse files Browse the repository at this point in the history
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
  • Loading branch information
ananzh committed Nov 2, 2022
1 parent c89f6b4 commit e1c06e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('failure hooks', function () {
{
flag: '$FAILING_TEST$',
assert(lines) {
expect(lines.shift()).to.match(/\$FAILING_TEST\$/);
expect(lines.shift()).to.match(/global before each/);
expect(lines.shift()).to.match(/info\s+testFailure\s+\$FAILING_TEST_ERROR\$/);
expect(lines.shift()).to.match(/info\s+testFailureAfterDelay\s+\$FAILING_TEST_ERROR\$/);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ it('only runs hooks of parents and tests in level1a', async () => {
"suite: ",
"suite: level 1",
"suite: level 1 level 1a",
"hook: \\"before each\\" hook: rootBeforeEach",
"hook: level 1 \\"before each\\" hook: level1BeforeEach",
"hook: \\"before each\\" hook: rootBeforeEach for \\"test 1a\\"",
"hook: level 1 \\"before each\\" hook: level1BeforeEach for \\"test 1a\\"",
"test: level 1 level 1a test 1a",
]
`);
Expand All @@ -130,8 +130,8 @@ it('only runs hooks of parents and tests in level1b', async () => {
"suite: ",
"suite: level 1",
"suite: level 1 level 1b",
"hook: \\"before each\\" hook: rootBeforeEach",
"hook: level 1 \\"before each\\" hook: level1BeforeEach",
"hook: \\"before each\\" hook: rootBeforeEach for \\"test 1b\\"",
"hook: level 1 \\"before each\\" hook: level1BeforeEach for \\"test 1b\\"",
"test: level 1 level 1b test 1b",
]
`);
Expand All @@ -149,12 +149,12 @@ it('only runs hooks of parents and tests in level1a and level1b', async () => {
"suite: ",
"suite: level 1",
"suite: level 1 level 1a",
"hook: \\"before each\\" hook: rootBeforeEach",
"hook: level 1 \\"before each\\" hook: level1BeforeEach",
"hook: \\"before each\\" hook: rootBeforeEach for \\"test 1a\\"",
"hook: level 1 \\"before each\\" hook: level1BeforeEach for \\"test 1a\\"",
"test: level 1 level 1a test 1a",
"suite: level 1 level 1b",
"hook: \\"before each\\" hook: rootBeforeEach",
"hook: level 1 \\"before each\\" hook: level1BeforeEach",
"hook: \\"before each\\" hook: rootBeforeEach for \\"test 1b\\"",
"hook: level 1 \\"before each\\" hook: level1BeforeEach for \\"test 1b\\"",
"test: level 1 level 1b test 1b",
]
`);
Expand All @@ -173,8 +173,8 @@ it('only runs level1a if including level1 and excluding level1b', async () => {
"suite: ",
"suite: level 1",
"suite: level 1 level 1a",
"hook: \\"before each\\" hook: rootBeforeEach",
"hook: level 1 \\"before each\\" hook: level1BeforeEach",
"hook: \\"before each\\" hook: rootBeforeEach for \\"test 1a\\"",
"hook: level 1 \\"before each\\" hook: level1BeforeEach for \\"test 1a\\"",
"test: level 1 level 1a test 1a",
]
`);
Expand All @@ -193,8 +193,8 @@ it('only runs level1b if including level1 and excluding level1a', async () => {
"suite: ",
"suite: level 1",
"suite: level 1 level 1b",
"hook: \\"before each\\" hook: rootBeforeEach",
"hook: level 1 \\"before each\\" hook: level1BeforeEach",
"hook: \\"before each\\" hook: rootBeforeEach for \\"test 1b\\"",
"hook: level 1 \\"before each\\" hook: level1BeforeEach for \\"test 1b\\"",
"test: level 1 level 1b test 1b",
]
`);
Expand All @@ -212,7 +212,7 @@ it('only runs level2 if excluding level1', async () => {
"suite: ",
"suite: level 2",
"suite: level 2 level 2a",
"hook: \\"before each\\" hook: rootBeforeEach",
"hook: \\"before each\\" hook: rootBeforeEach for \\"test 2a\\"",
"test: level 2 level 2a test 2a",
]
`);
Expand Down

0 comments on commit e1c06e6

Please sign in to comment.