[gjs/esm/dynamic-imports: 7/7] Add test for scripts and relative imports.
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/esm/dynamic-imports: 7/7] Add test for scripts and relative imports.
- Date: Tue, 9 Feb 2021 03:14:43 +0000 (UTC)
commit b15550edf5d1ce022ec1bce82d531b237603f355
Author: Evan Welsh <contact evanwelsh com>
Date: Mon Feb 8 19:10:36 2021 -0800
Add test for scripts and relative imports.
installed-tests/js/testImporter.js | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/installed-tests/js/testImporter.js b/installed-tests/js/testImporter.js
index b9c519c5..95fa50d1 100644
--- a/installed-tests/js/testImporter.js
+++ b/installed-tests/js/testImporter.js
@@ -237,4 +237,11 @@ describe('Importer', function () {
expect(imports[0]).not.toBeDefined();
expect(imports.foobar[0]).not.toBeDefined();
});
+
+ it("scripts support relative dynamic imports", async function() {
+ const { say } = await import('./modules/say.js');
+
+ expect(typeof say).toBe('function');
+ expect(say('hello')).toBe('<( hello )');
+ });
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]