Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] More test updates #5127

Merged
merged 11 commits into from
Apr 25, 2018
Merged

[v2] More test updates #5127

merged 11 commits into from
Apr 25, 2018

Conversation

m-allanson
Copy link
Contributor

Getting closer! I'll pick this up again tomorrow. See commits for details.

Previously:

Test Suites: 10 failed, 68 passed, 78 total
Tests:       11 failed, 4 skipped, 516 passed, 531 total
Snapshots:   4 failed, 211 passed, 215 total
Time:        20.828s
Ran all test suites.

Now:

Test Suites: 4 failed, 69 passed, 73 total
Tests:       1 failed, 3 skipped, 480 passed, 484 total
Snapshots:   200 passed, 200 total
Time:        21.513s, estimated 23s
Ran all test suites.

Note the reduced number of total tests, I think this is because the bootstrap process was compiling some tests which jest was then running.

Failing output now is:

Summary of all failing tests
 FAIL  packages/gatsby-source-contentful/src/__tests__/normalize.js
  ● Process contentful data › creates nodes for each entry

    ReferenceError: prepareTextNode is not defined

      334 |         ).type
      335 |         if (fieldType === `Text`) {
    > 336 |           const textNode = prepareTextNode(
      337 |             entryNode,
      338 |             entryItemFieldKey,
      339 |             entryItemFields[entryItemFieldKey],

      at Object.keys.forEach.entryItemFieldKey (packages/gatsby-source-contentful/src/normalize.js:336:28)
          at Array.forEach (<anonymous>)
      at entries.map.entryItem (packages/gatsby-source-contentful/src/normalize.js:322:36)
          at Array.map (<anonymous>)
      at locales.forEach.locale (packages/gatsby-source-contentful/src/normalize.js:224:32)
          at Array.forEach (<anonymous>)
      at Object.<anonymous>.exports.createContentTypeNodes (packages/gatsby-source-contentful/src/normalize.js:205:11)
      at contentTypeItems.forEach (packages/gatsby-source-contentful/src/__tests__/normalize.js:58:17)
          at Array.forEach (<anonymous>)
      at Object.it (packages/gatsby-source-contentful/src/__tests__/normalize.js:57:22)

 FAIL  packages/gatsby-plugin-less/src/__tests__/gatsby-node.js
  ● Test suite failed to run

    Your test suite must contain at least one test.

      at node_modules/jest-cli/build/test_scheduler.js:157:22

 FAIL  packages/gatsby-1-config-extract-plugin/src/__tests__/index.js
  ● Test suite failed to run

    Cannot find module 'webpack/lib/removeAndDo' from 'ExtractedModule.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:169:17)
      at Object.<anonymous> (node_modules/extract-text-webpack-plugin/ExtractedModule.js:30:42)

 FAIL  packages/gatsby-plugin-sass/src/__tests__/gatsby-node.js
  ● Test suite failed to run

    Your test suite must contain at least one test.

      at node_modules/jest-cli/build/test_scheduler.js:157:22

Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@KyleAMathews KyleAMathews merged commit d8de2ba into gatsbyjs:v2 Apr 25, 2018
@m-allanson m-allanson deleted the v2-more-tests branch April 25, 2018 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants