Skip to content

Instantly share code, notes, and snippets.

@spion
Last active August 14, 2018 22:06
Show Gist options
  • Save spion/bbb34c5abc1230a37ad5f4f01336b8df to your computer and use it in GitHub Desktop.
Save spion/bbb34c5abc1230a37ad5f4f01336b8df to your computer and use it in GitHub Desktop.
script -qfc 'yarn repro' /dev/null > raw.log
cat -vet raw.log
^[[2K^[[1G^[[1myarn run v1.7.0^[[22m^M$
^[[2K^[[1G^[[2m$ jest --watch^[[22m^M$
^[[2J^[[3J^[[H^[[1m^[[2mDetermining test suites to run...^[[1m^[[22m^[[999D^[[K^M$
^M$
^[[1mTest Suites: ^[[22m0 of 2 total^M$
^[[1mTests: ^[[22m0 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mlib/^[[22m^[[1mexample.spec.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m0 of 2 total^M$
^[[1mTests: ^[[22m0 total^M$^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^[[0m^[[7m^[[1m^[[32m PASS ^[[39m^[[22m^[[27m^[[0m ^[[2mlib/^[[22m^[[1mexample.spec.js^[[22m^M$
^M$^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mlib/^[[22m^[[1mexample.spec.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m0 of 2 total^M$
^[[1mTests: ^[[22m0 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A foo^M$
^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mlib/^[[22m^[[1mexample.spec.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m0 of 2 total^M$
^[[1mTests: ^[[22m0 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A ^[[32mM-bM-^\M-^S^[[39m ^[[2madds 5 (4ms)^[[22m^M$
^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mlib/^[[22m^[[1mexample.spec.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m0 of 2 total^M$
^[[1mTests: ^[[22m0 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mlib/^[[22m^[[1mexample.spec.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m0 of 2 total^M$
^[[1mTests: ^[[22m0 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mlib/^[[22m^[[1mexample.spec.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m0 of 2 total^M$
^[[1mTests: ^[[22m0 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 of 2 total^M$
^[[1mTests: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 1s^[[999D^[[K ^[[2mconsole.log^[[22m ^[[2mtests2/other-tests.js:5^[[22m^M$
JEST^M$
^M$
^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^[[0m^[[7m^[[1m^[[32m PASS ^[[39m^[[22m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 of 2 total^M$
^[[1mTests: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A bar^M$
^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 of 2 total^M$
^[[1mTests: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A ^[[32mM-bM-^\M-^S^[[39m ^[[2malways is true (15ms)^[[22m^M$
^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 of 2 total^M$
^[[1mTests: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
^M$
^[[0m^[[7m^[[33m^[[1m RUNS ^[[22m^[[39m^[[27m^[[0m ^[[2mtests2/^[[22m^[[1mother-tests.js^[[22m^M$
^M$
^[[1mTest Suites: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 of 2 total^M$
^[[1mTests: ^[[22m^[[1m^[[32m1 passed^[[39m^[[22m, 1 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^[[999D^[[K^[[1mTest Suites: ^[[22m^[[1m^[[32m2 passed^[[39m^[[22m, 2 total^M$
^[[1mTests: ^[[22m^[[1m^[[32m2 passed^[[39m^[[22m, 2 total^M$
^[[1mSnapshots: ^[[22m0 total^M$
^[[1mTime:^[[22m 1.128s^M$
^[[2mRan all test suites^[[22m^[[2m related to changed files^[[22m^[[2m.^[[22m^M$
^M$
^[[1mWatch Usage^[[22m^M$
^[[2m M-bM-^@M-: Press ^[[22ma^[[2m to run all tests.^[[22m^M$
^[[2m M-bM-^@M-: Press ^[[22mf^[[2m to run only failed tests.^[[22m^M$
^[[2m M-bM-^@M-: Press^[[22m p ^[[2mto filter by a filename regex pattern.^[[22m^M$
^[[2m M-bM-^@M-: Press^[[22m t ^[[2mto filter by a test name regex pattern.^[[22m^M$
^[[2m M-bM-^@M-: Press^[[22m q ^[[2mto quit watch mode.^[[22m^M$
^[[2m M-bM-^@M-: Press ^[[22mEnter^[[2m to trigger a test run.^[[22m^M$
PASS lib/example.spec.js
foo
✓ adds 5 (4ms)
RUNS tests2/other-tests.js
PASS tests2/other-tests.js2 total
bar
✓ always is true (15ms)
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.128s
Ran all test suites related to changed files.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› 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.

Command: cat -vet raw.log | sed -r 's/\^\[\[[0-9]+m//g'

^[[2K^[[1Gyarn run v1.7.0^M$
^[[2K^[[1G$ jest --watch^M$
^[[2J^[[3J^[[HDetermining test suites to run...^[[999D^[[K^M$
^M$
Test Suites: 0 of 2 total^M$
Tests:       0 total^M$
Snapshots:   0 total^M$
Time:        0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
 RUNS  tests2/other-tests.js^M$
 RUNS  lib/example.spec.js^M$
^M$
Test Suites: 0 of 2 total^M$
Tests:       0 total^M$
Snapshots:   0 total^M$
Time:        0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A PASS  lib/example.spec.js^M$
^M$
 RUNS  tests2/other-tests.js^M$
 RUNS  lib/example.spec.js^M$
^M$
Test Suites: 0 of 2 total^M$
Tests:       0 total^M$
Snapshots:   0 total^M$
Time:        0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A  foo^M$
^M$
 RUNS  tests2/other-tests.js^M$
 RUNS  lib/example.spec.js^M$
^M$
Test Suites: 0 of 2 total^M$
Tests:       0 total^M$
Snapshots:   0 total^M$
Time:        0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A    M-bM-^\M-^S adds 5 (4ms)^M$
^M$
 RUNS  tests2/other-tests.js^M$
 RUNS  lib/example.spec.js^M$
^M$
Test Suites: 0 of 2 total^M$
Tests:       0 total^M$
Snapshots:   0 total^M$
Time:        0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
^M$
 RUNS  tests2/other-tests.js^M$
 RUNS  lib/example.spec.js^M$
^M$
Test Suites: 0 of 2 total^M$
Tests:       0 total^M$
Snapshots:   0 total^M$
Time:        0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
 RUNS  tests2/other-tests.js^M$
 RUNS  lib/example.spec.js^M$
^M$
Test Suites: 0 of 2 total^M$
Tests:       0 total^M$
Snapshots:   0 total^M$
Time:        0s, estimated 1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
 RUNS  tests2/other-tests.js^M$
^M$
Test Suites: 1 passed, 1 of 2 total^M$
Tests:       1 passed, 1 total^M$
Snapshots:   0 total^M$
Time:        1s^[[999D^[[K  console.log tests2/other-tests.js:5^M$
    JEST^M$
^M$
^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A PASS  tests2/other-tests.js^M$
^M$
 RUNS  tests2/other-tests.js^M$
^M$
Test Suites: 1 passed, 1 of 2 total^M$
Tests:       1 passed, 1 total^M$
Snapshots:   0 total^M$
Time:        1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A  bar^M$
^M$
 RUNS  tests2/other-tests.js^M$
^M$
Test Suites: 1 passed, 1 of 2 total^M$
Tests:       1 passed, 1 total^M$
Snapshots:   0 total^M$
Time:        1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A    M-bM-^\M-^S always is true (15ms)^M$
^M$
 RUNS  tests2/other-tests.js^M$
^M$
Test Suites: 1 passed, 1 of 2 total^M$
Tests:       1 passed, 1 total^M$
Snapshots:   0 total^M$
Time:        1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M$
^M$
 RUNS  tests2/other-tests.js^M$
^M$
Test Suites: 1 passed, 1 of 2 total^M$
Tests:       1 passed, 1 total^M$
Snapshots:   0 total^M$
Time:        1s^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^M^[[K^M^[[1A^[[999D^[[KTest Suites: 2 passed, 2 total^M$
Tests:       2 passed, 2 total^M$
Snapshots:   0 total^M$
Time:        1.128s^M$
Ran all test suites related to changed files.^M$
^M$
Watch Usage^M$
 M-bM-^@M-: Press a to run all tests.^M$
 M-bM-^@M-: Press f to run only failed tests.^M$
 M-bM-^@M-: Press p to filter by a filename regex pattern.^M$
 M-bM-^@M-: Press t to filter by a test name regex pattern.^M$
 M-bM-^@M-: Press q to quit watch mode.^M$
 M-bM-^@M-: Press Enter to trigger a test run.^M$
^M$
^[[2K^[[1GDone in 15.35s.^M$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment