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

chore: Make sure copyright header comment includes license #8783

Merged
merged 3 commits into from Aug 6, 2019

Conversation

@pedrottimark
Copy link
Collaborator

pedrottimark commented Aug 5, 2019

Summary

Fixes #8666

  • Make criterion string more complete in scripts/checkCopyrightHeaders.js
  • Update comment in 152 files, ironically including scripts/checkCopyrightHeaders.js

Replace obsolete license:

  • packages/jest-circus/runner.js
  • packages/jest-circus/src/__mocks__/testEventHandler.ts
  • packages/jest-circus/src/__mocks__/testUtils.ts
  • packages/jest-circus/src/__tests__/afterAll.test.ts
  • packages/jest-circus/src/__tests__/baseTest.test.ts
  • packages/jest-circus/src/__tests__/hooks.test.ts
  • packages/jest-core/src/SnapshotInteractiveMode.ts
  • packages/jest-runtime/src/__tests__/defaultResolver.js
  • packages/jest-runtime/src/__tests__/test_root/sourcemaps/out/throwing-mapped-fn.js
  • packages/jest-runtime/src/__tests__/test_root/sourcemaps/throwing-mapped-fn.js

Draft multi-line criterion failed because of line endings, but I did not update yet:

  • packages/expect/src/__tests__/__arbitraries__/sharedSettings.ts
  • packages/expect/src/__tests__/matchers-toContain.property.test.ts
  • packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts
  • packages/expect/src/__tests__/matchers-toEqual.property.test.ts
  • packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts

Draft multi-line criterion found error extra All rights reserved. line:

  • packages/jest-docblock/src/__tests__/index.test.ts
  • packages/jest-haste-map/src/lib/__tests__/fast_path.test.js
  • packages/jest-haste-map/src/lib/__tests__/getPlatformExtension.test.js
  • packages/jest-haste-map/src/lib/__tests__/normalizePathSep.test.js
  • packages/jest-repl/src/cli/repl.ts
  • website/siteConfig.js

Question: What do you think?

  • Test each line individually to be less specific for comment syntax?
  • Test lines together but allow variation in line endings?
  • Test lines together and require nl=LF line endings?

Test plan

Updated 9 snapshots because line numbers increase by 5:

  • 1 e2e/__tests__/beforeAllFiltered.ts
  • 1 e2e/__tests__/beforeEachQueue.ts
  • 1 e2e/__tests__/coverageRemapping.test.ts
  • 2 e2e/__tests__/detectOpenHandles.ts
  • 1 e2e/__tests__/failures.test.ts
  • 1 e2e/__tests__/processExit.test.ts
  • 1 e2e/__tests__/resolveNoFileExtensions.test.ts
  • 1 packages/jest-core/src/__tests__/watch.test.js

Residue: tests passes even though packages/jest-runtime/src/__tests__/test_root/sourcemaps/out/throwing-mapped-fn.js.map still has obsolete license comment

@SimenB SimenB requested review from cpojer and scotthovestadt Aug 5, 2019
@cpojer
cpojer approved these changes Aug 6, 2019
Copy link
Contributor

cpojer left a comment

Thank you for cleaning this up.

@cpojer cpojer merged commit e740de2 into facebook:master Aug 6, 2019
10 of 11 checks passed
10 of 11 checks passed
ci/circleci: test-jest-circus Your tests failed on CircleCI
Details
ci/circleci: lint-and-typecheck Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-node-10 Your tests passed on CircleCI!
Details
ci/circleci: test-node-11 Your tests passed on CircleCI!
Details
ci/circleci: test-node-6 Your tests passed on CircleCI!
Details
ci/circleci: test-node-8 Your tests passed on CircleCI!
Details
ci/circleci: test-or-deploy-website Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
facebook.jest #20190805.2 succeeded
Details
@pedrottimark pedrottimark deleted the pedrottimark:obsolete-license branch Aug 6, 2019
jeysal added a commit to felipepastorelima/jest that referenced this pull request Aug 11, 2019
* upstream/master:
  expect: Display equal values for ReturnedWith similar to CalledWith (facebook#8791)
  Clearer messages for Node assert errors (facebook#8792)
  use babel-plugin-replace-ts-export-assignment package (facebook#8805)
  jest-matcher-utils: Add color options to matcherHint (facebook#8795)
  chore: Make sure copyright header comment includes license (facebook#8783)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.