arijs / prettier-miscellaneous

Prettier is an opinionated JavaScript formatter.
https://jlongster.github.io/prettier/
MIT License
158 stars 14 forks source link

Tests Failing on Windows #20

Open langdonx opened 7 years ago

langdonx commented 7 years ago

Does anyone develop on Windows? There are loads of warnings and one of the tests from master has been failing. These issues don't occur on prettier itself.

Failing Test

Summary of all failing tests
 FAIL  tests_integration\__tests__\with-node-modules.js
  - ignores node_modules by default for file list

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot 1.

    - Snapshot
    + Received

    -"not_node_modules/file.js
    +"node_modules/node-module.js
    +not_node_modules/file.js
     regular-module.js
     "

      at Object.<anonymous>.test (tests_integration/__tests__/with-node-modules.js:29:25)
      at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
      at process._tickCallback (internal/process/next_tick.js:109:7)

Snapshot Summary
 › 1 snapshot test failed in 1 test suite. Inspect your code changes or run with `npm run jest -- -u` to update them.

Test Suites: 1 failed, 682 passed, 683 total
Tests:       1 failed, 2296 passed, 2297 total
Snapshots:   1 failed, 1845 passed, 1846 total
Time:        42.174s
Ran all test suites.

Warnings

$ npm run jest

> prettier-miscellaneous@1.4.4 jest C:\source\prettier-miscellaneous
> jest

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: ExplicitProvidesModuleSameName
  Paths: C:\source\prettier-miscellaneous\tests\flow\declaration_files_haste\ExplicitProvidesModuleSameName.js collides with C:\source\prettier-miscellaneous\tests\flow\decl
aration_files_incremental_haste\ExplicitProvidesModuleSameName.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: ExplicitProvidesModuleDifferentName
  Paths: C:\source\prettier-miscellaneous\tests\flow\declaration_files_haste\ExplicitProvidesModuleDifferentName.js collides with C:\source\prettier-miscellaneous\tests\flow
\declaration_files_incremental_haste\ExplicitProvidesModuleDifferentName.js

... bunches more of the same error (@providesModule) from different files.
langdonx commented 7 years ago

Hmm, the warnings are showing in Travis and are also in prettier...

https://travis-ci.org/arijs/prettier-miscellaneous/jobs/244658166 https://travis-ci.org/prettier/prettier/jobs/242944480