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

WIP: Try add anothor tests #1

Merged
merged 9 commits into from
Oct 23, 2023
Merged

WIP: Try add anothor tests #1

merged 9 commits into from
Oct 23, 2023

Conversation

tamakiii
Copy link
Contributor

@tamakiii tamakiii commented Aug 16, 2018

@tamakiii tamakiii self-assigned this Aug 16, 2018
@tamakiii
Copy link
Contributor Author

❯ yarn jest --watchAll
 PASS  modules/bbb/__tests__/index.js
 PASS  src/sum.test.js
 FAIL  modules/aaa/__tests__/index.js
  ● Test suite failed to run

    Cannot find module '../config/index.js' from 'index.js'

      1 | 'use strict';
      2 |
    > 3 | import config from '../config/index.js';
        | ^
      4 |
      5 | function doit(directory) {
      6 |       return 'aaa:' + config.type;

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)
      at Object.<anonymous> (modules/aaa/src/index.js:3:1)

 PASS  __tests__/FileSummarizer-test.js

Test Suites: 1 failed, 3 passed, 4 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        2.466s
Ran all test suites.

Watch Usage
 › Press f to run only failed tests.
 › Press o to only run tests related to changed files.
 › Press p to filter by a filename regex pattern.
 › Press t to filter by a test name regex pattern.
 › Press q to quit watch mode.
 › Press Enter to trigger a test run.

@tamakiii
Copy link
Contributor Author

🤔

 FAIL  modules/aaa/__tests__/a.test.js
  ● aaa › aaa

    expect(received).toBe(expected) // Object.is equality

    Expected: "a < type is: mocked A"
    Received: "a < type is: A"

       7 | describe('aaa', () => {
       8 |   test('aaa', () => {
    >  9 |     expect(doit()).toBe('a < type is: mocked A')
         |                    ^
      10 |   });
      11 | });
      12 |

      at Object.toBe (modules/aaa/__tests__/a.test.js:9:20)

 PASS  __tests__/FileSummarizer-test.js
 PASS  src/sum.test.js
 FAIL  modules/bbb/__tests__/b.test.js
  ● bbb › bbb

    expect(received).toBe(expected) // Object.is equality

    Expected: "b < name is: mocked B"
    Received: "b < name is: B"

       7 | describe('bbb', () => {
       8 |   test('bbb', () => {
    >  9 |     expect(doit()).toBe('b < name is: mocked B')
         |                    ^
      10 |   });
      11 | });
      12 |

      at Object.toBe (modules/bbb/__tests__/b.test.js:9:20)

Test Suites: 2 failed, 2 passed, 4 total
Tests:       2 failed, 2 passed, 4 total
Snapshots:   0 total
Time:        2.585s
Ran all test suites.

Watch Usage: Press w to show more.

@tamakiii tamakiii merged commit c228b35 into master Oct 23, 2023
@tamakiii tamakiii deleted the try-add-anothor-tests branch October 23, 2023 12:02
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.

1 participant