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.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
47
gaia/tests/jsmarionette/runner/mozilla-profile-builder/test/pref.js
Executable file
47
gaia/tests/jsmarionette/runner/mozilla-profile-builder/test/pref.js
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
suite('pref', function() {
|
||||
var assert = require('assert');
|
||||
var pref = require('../lib/pref');
|
||||
var prefFn = 'pref';
|
||||
|
||||
test('string', function() {
|
||||
assert.equal(
|
||||
pref('foo', 'bar'),
|
||||
prefFn + '("foo", "bar");'
|
||||
);
|
||||
});
|
||||
|
||||
test('boolean', function() {
|
||||
assert.equal(
|
||||
pref('foo', true),
|
||||
prefFn + '("foo", true);'
|
||||
);
|
||||
});
|
||||
|
||||
test('object', function() {
|
||||
var obj = { a: true };
|
||||
assert.equal(
|
||||
pref('foo', obj),
|
||||
prefFn + '("foo", "' + JSON.stringify(obj) + '");'
|
||||
);
|
||||
});
|
||||
|
||||
test('array', function() {
|
||||
var obj = ['foo', 'bar'];
|
||||
assert.equal(
|
||||
pref('foo', obj),
|
||||
prefFn + '("foo", "' + JSON.stringify(obj) + '");'
|
||||
);
|
||||
});
|
||||
|
||||
test('given a single object', function() {
|
||||
var expected = '';
|
||||
expected += pref('foo', true) + '\n';
|
||||
expected += pref('bar', true);
|
||||
|
||||
assert.equal(
|
||||
pref({ foo: true, bar: true }),
|
||||
expected
|
||||
);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue