Skip to content

Commit

Permalink
build(devs-infra): update project deps and e2e deps (#3124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl authored Dec 5, 2021
1 parent ab81e8f commit 26e439a
Show file tree
Hide file tree
Showing 26 changed files with 16,948 additions and 25,405 deletions.
19 changes: 14 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
interval: 'daily'
commit-message:
prefix: 'build(deps-dev)'
labels:
- 'dependencies'

- package-ecosystem: 'npm'
directory: /
schedule:
interval: 'daily'
reviewers:
- 'ahnpnl'
ignore:
- dependency-name: 'jest*'
- dependency-name: '@jest*'
commit-message:
prefix: 'build(deps-dev)'
labels:
- 'dependencies'
versioning-strategy: increase-if-necessary
27 changes: 27 additions & 0 deletions e2e/__tests__/__snapshots__/const-enum.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`partial successfully runs the tests inside const-enum with 'isolatedModules: true' 1`] = `
"FAIL __tests__/import-from-d-ts-no-js.spec.ts
● Test suite failed to run
Cannot find module '../hoo-constant' from '__tests__/import-from-d-ts-no-js.spec.ts'
However, Jest was able to find:
'../hoo-constant.d.ts'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'jsx', 'ts', 'tsx', 'json', 'node'].
See https://jestjs.io/docs/configuration#modulefileextensions-arraystring
> 1 | import { HooConstEnum } from '../hoo-constant'
| ^
2 |
3 | const getTwo = (): string => HooConstEnum.two
4 |
at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:324:11)
at Object.<anonymous> (__tests__/import-from-d-ts-no-js.spec.ts:1:1)
PASS __tests__/import-from-d-ts-has-js.spec.ts
PASS __tests__/import-from-ts.spec.ts"
`;
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/enum.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`partial successfully runs the tests inside \`enum/\` with \`isolatedMod
3 | const getTwo = (): string => HooEnum.two
4 |
at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:322:11)
at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:324:11)
at Object.<anonymous> (__tests__/import-from-d-ts-no-js.spec.ts:1:1)
PASS __tests__/import-from-d-ts-has-js.spec.ts
Expand All @@ -45,7 +45,7 @@ exports[`partial successfully runs the tests inside \`enum/\` with \`isolatedMod
3 | const getTwo = (): string => HooEnum.two
4 |
at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:322:11)
at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:324:11)
at Object.<anonymous> (__tests__/import-from-d-ts-no-js.spec.ts:1:1)
PASS __tests__/import-from-d-ts-has-js.spec.ts
Expand Down
26 changes: 1 addition & 25 deletions e2e/__tests__/const-enum.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,5 @@ test(`successfully runs the tests inside ${DIR_NAME} with 'isolatedModules: fals
test(`partial successfully runs the tests inside ${DIR_NAME} with 'isolatedModules: true'`, () => {
const result = runJest(DIR_NAME, ['-c=jest-isolated.config.js'])

expect(extractSortedSummary(result.stderr).rest).toMatchInlineSnapshot(`
"FAIL __tests__/import-from-d-ts-no-js.spec.ts
● Test suite failed to run
Cannot find module '../hoo-constant' from '__tests__/import-from-d-ts-no-js.spec.ts'
However, Jest was able to find:
'../hoo-constant.d.ts'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'jsx', 'ts', 'tsx', 'json', 'node'].
See https://jestjs.io/docs/configuration#modulefileextensions-arraystring
> 1 | import { HooConstEnum } from '../hoo-constant'
| ^
2 |
3 | const getTwo = (): string => HooConstEnum.two
4 |
at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:322:11)
at Object.<anonymous> (__tests__/import-from-d-ts-no-js.spec.ts:1:1)
PASS __tests__/import-from-d-ts-has-js.spec.ts
PASS __tests__/import-from-ts.spec.ts"
`)
expect(extractSortedSummary(result.stderr).rest).toMatchSnapshot()
})
3 changes: 3 additions & 0 deletions e2e/__tests__/test-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ beforeAll(() => {
})

test(`successfully runs the tests inside ${DIR_NAME}`, () => {
process.env.DISABLE_MOCKED_WARNING = 'true'
const { json } = runWithJson(DIR_NAME, undefined, {
stripAnsi: true,
})

expect(json.success).toBe(true)

delete process.env.DISABLE_MOCKED_WARNING
})
Loading

0 comments on commit 26e439a

Please sign in to comment.