aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-14 11:32:30 -0500
committerGitHub <noreply@github.com>2021-02-14 11:32:30 -0500
commit5268c5d1bc079ac99e99cf04853d3dea22def403 (patch)
tree0ea2383369fe571bd0686e69a626db1464c92a8a /test
parent0117df6bd8b1603fec0eb5b8d840e777372f47c8 (diff)
Util rename (#1389)
* Rename MediaUtility to MediaUtil for consistency * Update variable names * Rename media-utility.js to media-util.js * Rename ProfileConditions to ProfileConditionsUtil * Rename variables * Move profile-conditions.js to profile-conditions-util.js * Rename test-profile-conditions.js to test-profile-conditions-util.js
Diffstat (limited to 'test')
-rw-r--r--test/test-database.js2
-rw-r--r--test/test-profile-conditions-util.js (renamed from test/test-profile-conditions.js)14
-rw-r--r--test/test-translator.js2
3 files changed, 9 insertions, 9 deletions
diff --git a/test/test-database.js b/test/test-database.js
index ae827318..40bdc0fd 100644
--- a/test/test-database.js
+++ b/test/test-database.js
@@ -26,7 +26,7 @@ vm.execute([
'js/core.js',
'js/general/cache-map.js',
'js/data/json-schema.js',
- 'js/media/media-utility.js',
+ 'js/media/media-util.js',
'js/language/dictionary-importer.js',
'js/data/database.js',
'js/language/dictionary-database.js'
diff --git a/test/test-profile-conditions.js b/test/test-profile-conditions-util.js
index e1e6a72c..ebc72be7 100644
--- a/test/test-profile-conditions.js
+++ b/test/test-profile-conditions-util.js
@@ -25,9 +25,9 @@ vm.execute([
'js/core.js',
'js/general/cache-map.js',
'js/data/json-schema.js',
- 'js/background/profile-conditions.js'
+ 'js/background/profile-conditions-util.js'
]);
-const [JsonSchemaValidator, ProfileConditions] = vm.get(['JsonSchemaValidator', 'ProfileConditions']);
+const [JsonSchemaValidator, ProfileConditionsUtil] = vm.get(['JsonSchemaValidator', 'ProfileConditionsUtil']);
function schemaValidate(value, schema) {
@@ -63,8 +63,8 @@ function testNormalizeContext() {
];
for (const {context, expected} of data) {
- const profileConditions = new ProfileConditions();
- const actual = profileConditions.normalizeContext(context);
+ const profileConditionsUtil = new ProfileConditionsUtil();
+ const actual = profileConditionsUtil.normalizeContext(context);
vm.assert.deepStrictEqual(actual, expected);
}
}
@@ -818,14 +818,14 @@ function testSchemas() {
];
for (const {conditionGroups, expectedSchema, inputs} of data) {
- const profileConditions = new ProfileConditions();
- const schema = profileConditions.createSchema(conditionGroups);
+ const profileConditionsUtil = new ProfileConditionsUtil();
+ const schema = profileConditionsUtil.createSchema(conditionGroups);
if (typeof expectedSchema !== 'undefined') {
vm.assert.deepStrictEqual(schema, expectedSchema);
}
if (Array.isArray(inputs)) {
for (const {expected, context} of inputs) {
- const normalizedContext = profileConditions.normalizeContext(context);
+ const normalizedContext = profileConditionsUtil.normalizeContext(context);
const actual = schemaValidate(normalizedContext, schema);
assert.strictEqual(actual, expected);
}
diff --git a/test/test-translator.js b/test/test-translator.js
index 2d7b6baa..09f1ee62 100644
--- a/test/test-translator.js
+++ b/test/test-translator.js
@@ -40,7 +40,7 @@ async function createVM() {
'js/general/cache-map.js',
'js/language/japanese-util.js',
'js/data/json-schema.js',
- 'js/media/media-utility.js',
+ 'js/media/media-util.js',
'js/language/dictionary-importer.js',
'js/data/database.js',
'js/language/dictionary-database.js',