Closed koudaiii closed 1 month ago
$ npm run test:e2e
> jp-learn-microsoft-com-update-checker@1.2.0 test:e2e
> jest tests/e2e
PASS tests/e2e/content.e2e.test.js (7.498 s)
JP Learn Microsoft.com Update Checker E2E Test
✓ should display English update date on Japanese Microsoft Learn page (982 ms)
✓ should not run script on non-ja-jp pages (423 ms)
✓ should run script with jp-learn-microsoft-com-update-checker-debug flag (217 ms)
Test Suites: 1 passed, 1 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 7.574 s, estimated 10 s
Ran all test suites matching /tests\/e2e/i.
$ npm run test:unit
np
> jp-learn-microsoft-com-update-checker@1.2.0 test:unit
> jest tests/unit
(node:84458) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
PASS tests/unit/content.test.js
URL Check in Content Script
✓ should only run script if URL starts with https://learn.microsoft.com/ja-jp/ (3 ms)
✓ should not run script if URL does not start with https://learn.microsoft.com/ja-jp/ (1 ms)
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 2.724 s
Ran all test suites matching /tests\/unit/i.
👌
Why & What
If the page is in en-us, early return.