summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/docs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /browser/components/newtab/docs
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/newtab/docs')
-rw-r--r--browser/components/newtab/docs/index.rst2
-rw-r--r--browser/components/newtab/docs/v2-system-addon/preferences.md2
-rw-r--r--browser/components/newtab/docs/v2-system-addon/unit_testing_guide.md8
3 files changed, 6 insertions, 6 deletions
diff --git a/browser/components/newtab/docs/index.rst b/browser/components/newtab/docs/index.rst
index 48cf01c331..5a11688267 100644
--- a/browser/components/newtab/docs/index.rst
+++ b/browser/components/newtab/docs/index.rst
@@ -8,7 +8,7 @@ Some of these source files (such as ``.js``, ``.jsx``, and ``.scss``) require an
We are working on migrating this to work with ``mach``, but in the meantime, please
follow the following steps if you need to make changes in this directory:
-For ``.jsm`` or ``.sys.mjs`` files (system modules)
+For ``.sys.mjs`` files (system modules)
---------------------------------------------------
No build step is necessary. Use ``mach`` and run mochitests according to your regular Firefox workflow.
diff --git a/browser/components/newtab/docs/v2-system-addon/preferences.md b/browser/components/newtab/docs/v2-system-addon/preferences.md
index ec6ba82491..d709e830e4 100644
--- a/browser/components/newtab/docs/v2-system-addon/preferences.md
+++ b/browser/components/newtab/docs/v2-system-addon/preferences.md
@@ -43,7 +43,7 @@ pref in the following files:
You can see an example in [this patch](https://github.com/mozilla/activity-stream/pull/2977).
-## Reading, setting, and observing preferences from `.jsm`s
+## Reading, setting, and observing preferences from `.sys.mjs`s
To read/set/observe Activity Stream preferences, construct a `Prefs` instance found in `lib/ActivityStreamPrefs.sys.mjs`.
diff --git a/browser/components/newtab/docs/v2-system-addon/unit_testing_guide.md b/browser/components/newtab/docs/v2-system-addon/unit_testing_guide.md
index c3dd369a2d..bc0b2e8b53 100644
--- a/browser/components/newtab/docs/v2-system-addon/unit_testing_guide.md
+++ b/browser/components/newtab/docs/v2-system-addon/unit_testing_guide.md
@@ -4,7 +4,7 @@
Our unit tests in Activity Stream are written with mocha, chai, and sinon, and run
with karma. They include unit tests for both content code (React components, etc.)
-and `.jsm`s.
+and `.sys.mjs`s.
You can find unit tests in `tests/unit`.
@@ -32,7 +32,7 @@ If you are creating a new test, add it to a subdirectory of the `tests/unit`
that corresponds to the file you are testing. Tests should end with `.test.js` or
`.test.jsx` if the test includes any jsx.
-For example, if the file you are testing is `lib/Foo.jsm`, the test
+For example, if the file you are testing is `lib/Foo.sys.mjs`, the test
file should be `test/unit/lib/Foo.test.js`
## Mocha tests
@@ -96,9 +96,9 @@ assert.isUserEventAction({type: "FOO"});
assert.isUserEventAction(ac.UserEvent({event: "BLOOP"}));
```
-## Overriding globals in `.jsm`s
+## Overriding globals in `.sys.mjs`s
-Most `.jsm`s you will be testing use `Cu.import` or `XPCOMUtils` to inject globals.
+Most `.sys.mjs`s you will be testing use `Cu.import` or `XPCOMUtils` to inject globals.
In order to add mocks/stubs/fakes for these globals, you should use the `GlobalOverrider`
utility in `test/unit/utils`: