mizdra / happy-css-modules

Typed, definition jumpable CSS Modules. Moreover, easy!
MIT License
233 stars 5 forks source link

Reuse tsserver process #143

Closed mizdra closed 2 years ago

mizdra commented 2 years ago

Test execution time is improved.

Before

pnpm run test go-to

> happy-css-modules@0.3.0 test /Users/mizdra/src/github.com/mizdra/happy-css-modules
> NODE_OPTIONS="--experimental-vm-modules $NODE_OPTIONS" jest "go-to"

(node:66586) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 PASS  src/integration-test/go-to-definition.test.ts
  ✓ basic (713 ms)
  ✓ imported tokens (345 ms)
  ✓ with transformer (465 ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   4 passed, 4 total
Time:        1.9 s, estimated 2 s
Ran all test suites matching /go-to/i.

After

$ pnpm run test go-to

> happy-css-modules@0.3.0 test /Users/mizdra/src/github.com/mizdra/happy-css-modules
> NODE_OPTIONS="--experimental-vm-modules $NODE_OPTIONS" jest "go-to"

(node:66711) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 PASS  src/integration-test/go-to-definition.test.ts
  ✓ basic (376 ms)
  ✓ imported tokens (25 ms)
  ✓ with transformer (142 ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   4 passed, 4 total
Time:        0.926 s, estimated 1 s
Ran all test suites matching /go-to/i.