VulpesOS/gaia/apps/system/test/unit/manifest_helper_test.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

32 lines
798 B
JavaScript
Executable file

// Tests the manifest_helper.js from shared
'use strict';
/* global ManifestHelper, MockL10n */
require('/shared/test/unit/mocks/mock_l10n.js');
requireApp('system/shared/js/manifest_helper.js');
suite('ManifestHelper', function() {
var realL10n;
suiteSetup(function() {
realL10n = navigator.mozL10n;
navigator.mozL10n = MockL10n;
});
suiteTeardown(function() {
navigator.mozL10n = realL10n;
});
test('All properties the same when no locales', function() {
var data = {
name: 'Built-in Keyboard',
description: 'Built-in Keyboard',
type: 'certified',
role: 'keyboard'
};
var helper = new ManifestHelper(data);
for (var prop in data) {
assert.equal(helper[prop], data[prop], 'Value for ' + prop + 'matches');
}
});
});