Skip to content

Commit

Permalink
Fix error snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed May 25, 2018
1 parent 19c2d23 commit af0b8ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ Object {
}
`;

exports[`create function throws error when encounter mismatched entities in which a folder is requested in place of a file 1`] = `[Error: EISDIR: illegal operation on a directory, open 'tmp/create.2.0/mismatched']`;
exports[`create function throws error when encounter mismatched entities in which a file is requested in place of a folder 1`] = `[Error: EISDIR: illegal operation on a directory, open 'tmp/create.2.0/mismatched']`;

exports[`create function throws error when encounter mismatched entities in which a folder is requested in place of a file 1`] = `[Error: Entity tmp/create.2.1/mismatched exists but is not directory]`;

exports[`traverse function does not dig names end with "B" 1`] = `
Array [
Expand Down Expand Up @@ -340,9 +342,7 @@ Array [
]
`;

exports[`traverse function works with default \`deep\` and \`level\` 1`] = `[Error: Entity tmp/create.2.1/mismatched exists but is not directory]`;

exports[`traverse function works with default \`deep\` and \`level\` 2`] = `
exports[`traverse function works with default \`deep\` and \`level\` 1`] = `
Array [
Object {
"container": "tmp/traverse.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/typescript/fs-tree-utils/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ const createTreeGetter = (container: string) => () => Promise.all([
subject.read.flat(container)
]).then(([nested, flat]) => ({nested, flat}))

beforeAll(async () => {
beforeEach(async () => {
await fsx.mkdir(tmpContainer)
chdir(tmpContainer)
await fsx.remove(tmp)
await fsx.mkdir(tmp)
})

afterAll(async () => {
afterEach(async () => {
chdir(oldCwd)
await fsx.remove(tmpContainer)
})
Expand Down Expand Up @@ -105,7 +105,7 @@ describe('create function', () => {
}

await subject.create(existingTree, container)
expect(subject.create(expectedTree, container)).rejects.toMatchSnapshot()
await expect(subject.create(expectedTree, container)).rejects.toMatchSnapshot()
})

it('in which a folder is requested in place of a file', async () => {
Expand All @@ -121,7 +121,7 @@ describe('create function', () => {
}

await subject.create(existingTree, container)
expect(subject.create(expectedTree, container)).rejects.toMatchSnapshot()
await expect(subject.create(expectedTree, container)).rejects.toMatchSnapshot()
})
})
})
Expand Down

0 comments on commit af0b8ba

Please sign in to comment.