koudaiii / learn-microsoft-com-update-checker

Chrome extension to check and display the latest update date from the English version of Microsoft Learn pages when viewing the current language version.
https://chromewebstore.google.com/detail/learnmicrosoftcom-update/addjjinolilbffnlnfbaglljhngjminl
MIT License
1 stars 1 forks source link

refactor about currentLang #12

Closed koudaiii closed 1 month ago

koudaiii commented 1 month ago

Why & What

Refactor about currentLang

koudaiii commented 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 (5.466 s)
  JP Learn Microsoft.com Update Checker E2E Test
    ✓ should display English update date on Japanese Microsoft Learn page (790 ms)
    ✓ should not run script on non-ja-jp pages (392 ms)
    ✓ should run script with jp-learn-microsoft-com-update-checker-debug flag (224 ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        5.517 s, estimated 9 s
Ran all test suites matching /tests\/e2e/i.
$ npm run test:unit

> jp-learn-microsoft-com-update-checker@1.2.0 test:unit
> jest tests/unit

(node:76202) [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:        1.739 s
Ran all test suites matching /tests\/unit/i.

👌