[gjs: 5/7] tests: Move bad overrides to 'badOverrides' directory
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 5/7] tests: Move bad overrides to 'badOverrides' directory
- Date: Sat, 17 Aug 2019 01:48:46 +0000 (UTC)
commit afcddf2b7debc94075bb5204245e454fefe21c27
Author: Philip Chimento <philip chimento gmail com>
Date: Thu Aug 8 16:12:44 2019 -0700
tests: Move bad overrides to 'badOverrides' directory
These bad overrides are used in testImporter.js to check what happens if
there is an error in overrides. However, since we would like to put in
real overrides to test, they should move to a specific directory where
they don't conflict with real overrides.
.eslintignore | 2 +-
installed-tests/js/jsunit.gresources.xml | 8 ++++----
installed-tests/js/modules/badOverrides/.eslintrc.yml | 6 ++++++
.../js/modules/{overrides => badOverrides}/GIMarshallingTests.js | 0
installed-tests/js/modules/{overrides => badOverrides}/Gio.js | 0
installed-tests/js/modules/{overrides => badOverrides}/Regress.js | 0
installed-tests/js/modules/{overrides => badOverrides}/WarnLib.js | 0
installed-tests/js/modules/overrides/.eslintrc.yml | 1 -
installed-tests/js/testImporter.js | 4 ++--
9 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/.eslintignore b/.eslintignore
index 4e40cb05..b9f94d7f 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,3 +1,3 @@
installed-tests/js/jasmine.js
-installed-tests/js/modules/overrides/WarnLib.js
+installed-tests/js/modules/badOverrides/WarnLib.js
modules/jsUnit.js
diff --git a/installed-tests/js/jsunit.gresources.xml b/installed-tests/js/jsunit.gresources.xml
index 15bd3308..936bbbf9 100644
--- a/installed-tests/js/jsunit.gresources.xml
+++ b/installed-tests/js/jsunit.gresources.xml
@@ -5,16 +5,16 @@
<file>jasmine.js</file>
<file>minijasmine.js</file>
<file>modules/alwaysThrows.js</file>
+ <file>modules/badOverrides/GIMarshallingTests.js</file>
+ <file>modules/badOverrides/Gio.js</file>
+ <file>modules/badOverrides/Regress.js</file>
+ <file>modules/badOverrides/WarnLib.js</file>
<file>modules/foobar.js</file>
<file>modules/lexicalScope.js</file>
<file>modules/modunicode.js</file>
<file>modules/mutualImport/a.js</file>
<file>modules/mutualImport/b.js</file>
<file>modules/subA/subB/__init__.js</file>
- <file>modules/overrides/GIMarshallingTests.js</file>
- <file>modules/overrides/Gio.js</file>
- <file>modules/overrides/Regress.js</file>
- <file>modules/overrides/WarnLib.js</file>
<file>modules/subA/subB/baz.js</file>
<file>modules/subA/subB/foobar.js</file>
</gresource>
diff --git a/installed-tests/js/modules/badOverrides/.eslintrc.yml
b/installed-tests/js/modules/badOverrides/.eslintrc.yml
new file mode 100644
index 00000000..c65c1600
--- /dev/null
+++ b/installed-tests/js/modules/badOverrides/.eslintrc.yml
@@ -0,0 +1,6 @@
+---
+rules:
+ no-throw-literal: 'off' # these are intended to be bad code
+ no-unused-vars:
+ - error
+ - varsIgnorePattern: ^_init$
diff --git a/installed-tests/js/modules/overrides/GIMarshallingTests.js
b/installed-tests/js/modules/badOverrides/GIMarshallingTests.js
similarity index 100%
rename from installed-tests/js/modules/overrides/GIMarshallingTests.js
rename to installed-tests/js/modules/badOverrides/GIMarshallingTests.js
diff --git a/installed-tests/js/modules/overrides/Gio.js b/installed-tests/js/modules/badOverrides/Gio.js
similarity index 100%
rename from installed-tests/js/modules/overrides/Gio.js
rename to installed-tests/js/modules/badOverrides/Gio.js
diff --git a/installed-tests/js/modules/overrides/Regress.js
b/installed-tests/js/modules/badOverrides/Regress.js
similarity index 100%
rename from installed-tests/js/modules/overrides/Regress.js
rename to installed-tests/js/modules/badOverrides/Regress.js
diff --git a/installed-tests/js/modules/overrides/WarnLib.js
b/installed-tests/js/modules/badOverrides/WarnLib.js
similarity index 100%
rename from installed-tests/js/modules/overrides/WarnLib.js
rename to installed-tests/js/modules/badOverrides/WarnLib.js
diff --git a/installed-tests/js/modules/overrides/.eslintrc.yml
b/installed-tests/js/modules/overrides/.eslintrc.yml
index c65c1600..189476b0 100644
--- a/installed-tests/js/modules/overrides/.eslintrc.yml
+++ b/installed-tests/js/modules/overrides/.eslintrc.yml
@@ -1,6 +1,5 @@
---
rules:
- no-throw-literal: 'off' # these are intended to be bad code
no-unused-vars:
- error
- varsIgnorePattern: ^_init$
diff --git a/installed-tests/js/testImporter.js b/installed-tests/js/testImporter.js
index 0f5a1a61..6100a412 100644
--- a/installed-tests/js/testImporter.js
+++ b/installed-tests/js/testImporter.js
@@ -6,11 +6,11 @@ describe('GI importer', function () {
describe('on failure', function () {
// For these tests, we provide special overrides files to sabotage the
- // import, at the path resource:///org/gjs/jsunit/modules/overrides.
+ // import, at the path resource:///org/gjs/jsunit/modules/badOverrides.
let oldSearchPath;
beforeAll(function () {
oldSearchPath = imports.overrides.searchPath.slice();
- imports.overrides.searchPath = ['resource:///org/gjs/jsunit/modules/overrides'];
+ imports.overrides.searchPath = ['resource:///org/gjs/jsunit/modules/badOverrides'];
});
afterAll(function () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]