Skip to content

Commit

Permalink
Add template heading extraction and validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mattphillips committed Jul 30, 2019
1 parent 473de82 commit 4c03d88
Show file tree
Hide file tree
Showing 4 changed files with 418 additions and 3 deletions.
288 changes: 288 additions & 0 deletions packages/jest-each/src/__tests__/__snapshots__/template.test.ts.snap
Expand Up @@ -5,6 +5,42 @@ exports[`jest-each .describe throws an error when called with an empty string 1`
"
`;

exports[`jest-each .describe throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .describe throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .describe throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .describe throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down Expand Up @@ -44,6 +80,42 @@ exports[`jest-each .describe.only throws an error when called with an empty stri
"
`;
exports[`jest-each .describe.only throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .describe.only throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .describe.only throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .describe.only throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down Expand Up @@ -83,6 +155,42 @@ exports[`jest-each .fdescribe throws an error when called with an empty string 1
"
`;
exports[`jest-each .fdescribe throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .fdescribe throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .fdescribe throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .fdescribe throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down Expand Up @@ -122,6 +230,42 @@ exports[`jest-each .fit throws an error when called with an empty string 1`] = `
"
`;
exports[`jest-each .fit throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .fit throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .fit throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .fit throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down Expand Up @@ -161,6 +305,42 @@ exports[`jest-each .it throws an error when called with an empty string 1`] = `
"
`;
exports[`jest-each .it throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .it throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .it throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .it throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down Expand Up @@ -200,6 +380,42 @@ exports[`jest-each .it.only throws an error when called with an empty string 1`]
"
`;
exports[`jest-each .it.only throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .it.only throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .it.only throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .it.only throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down Expand Up @@ -239,6 +455,42 @@ exports[`jest-each .test throws an error when called with an empty string 1`] =
"
`;
exports[`jest-each .test throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .test throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .test throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .test throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down Expand Up @@ -278,6 +530,42 @@ exports[`jest-each .test.only throws an error when called with an empty string 1
"
`;
exports[`jest-each .test.only throws error when there are additional words in first column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a is the left | b | expected</>
<red> \\"</>"
`;
exports[`jest-each .test.only throws error when there are additional words in last column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b | expected value</>
<red> \\"</>"
`;
exports[`jest-each .test.only throws error when there are additional words in second column heading 1`] = `
"Table headings do not conform to expected format:
<green>heading1 | headingN</>
Received:
<red>\\"</>
<red> a | b is the right | expected</>
<red> \\"</>"
`;
exports[`jest-each .test.only throws error when there are fewer arguments than headings over multiple rows 1`] = `
"Not enough arguments supplied for given headings:
<green>a | b | expected</>
Expand Down

0 comments on commit 4c03d88

Please sign in to comment.