Skip to content

Commit

Permalink
Try stripping whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
namuol committed Apr 14, 2017
1 parent bdaa451 commit 8946f6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,48 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`the dangerfile gitDSL should include \`added\` text content of the file 1`] = `
"+ \\"Example/Build\\",
+ \\"externals/\\""
`;
exports[`the dangerfile gitDSL should include \`added\` text content of the file 1`] = `"+\\"Example/Build\\",+\\"externals/\\""`;

exports[`the dangerfile gitDSL should include \`after\` text content of the file 1`] = `
"{
\\"compilerOptions\\": {
\\"allowJs\\": true
},
\\"exclude\\": [
\\"node_modules\\",
\\"Pod/Assets\\",
\\"Example/Build\\",
\\"externals/\\"
]
}
"
`;
exports[`the dangerfile gitDSL should include \`after\` text content of the file 1`] = `"{\\"compilerOptions\\":{\\"allowJs\\":true},\\"exclude\\":[\\"node_modules\\",\\"Pod/Assets\\",\\"Example/Build\\",\\"externals/\\"]}"`;

exports[`the dangerfile gitDSL should include \`before\` text content of the file 1`] = `
"{
\\"compilerOptions\\": {
\\"allowJs\\": true
},
\\"exclude\\": [
\\"node_modules\\",
\\"Pod/Assets\\",
\\"Example/Build\\"
]
}
"
`;
exports[`the dangerfile gitDSL should include \`before\` text content of the file 1`] = `"{\\"compilerOptions\\":{\\"allowJs\\":true},\\"exclude\\":[\\"node_modules\\",\\"Pod/Assets\\",\\"Example/Build\\"]}"`;

exports[`the dangerfile gitDSL should include \`removed\` text content of the file 1`] = `"- \\"Example/Build\\""`;
exports[`the dangerfile gitDSL should include \`removed\` text content of the file 1`] = `"-\\"Example/Build\\""`;

exports[`the dangerfile gitDSL shows the diff for a specific file 1`] = `
" \\"exclude\\": [
\\"node_modules\\",
\\"Pod/Assets\\",
- \\"Example/Build\\"
+ \\"Example/Build\\",
+ \\"externals/\\"
]
}"
`;
exports[`the dangerfile gitDSL shows the diff for a specific file 1`] = `"\\"exclude\\":[\\"node_modules\\",\\"Pod/Assets\\",-\\"Example/Build\\"+\\"Example/Build\\",+\\"externals/\\"]}"`;
10 changes: 5 additions & 5 deletions source/platforms/github/_tests/_github_git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,35 @@ describe("the dangerfile gitDSL", async () => {
const gitDSL = await github.getPlatformGitRepresentation()
const {diff} = await gitDSL.diffForFile("tsconfig.json")

expect(diff).toMatchSnapshot()
expect(diff.replace(/\s/g, "")).toMatchSnapshot()
})

it("should include `before` text content of the file", async () => {
const gitDSL = await github.getPlatformGitRepresentation()
const {before} = await gitDSL.diffForFile("tsconfig.json")

expect(before).toMatchSnapshot()
expect(before.replace(/\s/g, "")).toMatchSnapshot()
})

it("should include `after` text content of the file", async () => {
const gitDSL = await github.getPlatformGitRepresentation()
const {after} = await gitDSL.diffForFile("tsconfig.json")

expect(after).toMatchSnapshot()
expect(after.replace(/\s/g, "")).toMatchSnapshot()
})

it("should include `added` text content of the file", async () => {
const gitDSL = await github.getPlatformGitRepresentation()
const {added} = await gitDSL.diffForFile("tsconfig.json")

expect(added).toMatchSnapshot()
expect(added.replace(/\s/g, "")).toMatchSnapshot()
})

it("should include `removed` text content of the file", async () => {
const gitDSL = await github.getPlatformGitRepresentation()
const {removed} = await gitDSL.diffForFile("tsconfig.json")

expect(removed).toMatchSnapshot()
expect(removed.replace(/\s/g, "")).toMatchSnapshot()
})

it("resolves to `null` for files not in modified_files", async () => {
Expand Down

0 comments on commit 8946f6c

Please sign in to comment.