mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-02 23:27:38 -04:00
refactor events to mixin from separate class
This commit is contained in:
+22
-12
@@ -3,19 +3,29 @@
|
||||
var utils = require('../../../src/scripts/lib/utils');
|
||||
var assert = require('chai').assert;
|
||||
|
||||
describe('.updateProperties', function() {
|
||||
var obj;
|
||||
describe('Utils', function() {
|
||||
describe('.updateProperties', function() {
|
||||
var obj;
|
||||
|
||||
beforeEach(function() {
|
||||
obj = {
|
||||
one: 1,
|
||||
two: 2
|
||||
};
|
||||
});
|
||||
beforeEach(function() {
|
||||
obj = {
|
||||
one: 1,
|
||||
two: 2
|
||||
};
|
||||
});
|
||||
|
||||
it('sets the properties as non-writable', function() {
|
||||
utils.updateProperties(obj, { writable: false });
|
||||
assert.strictEqual(Object.getOwnPropertyDescriptor(obj, 'one').writable, false);
|
||||
assert.strictEqual(Object.getOwnPropertyDescriptor(obj, 'two').writable, false);
|
||||
it('sets the properties as non-writable', function() {
|
||||
utils.updateProperties(obj, { writable: false });
|
||||
assert.strictEqual(
|
||||
Object.getOwnPropertyDescriptor(obj, 'one').writable,
|
||||
false
|
||||
);
|
||||
assert.strictEqual(
|
||||
Object.getOwnPropertyDescriptor(obj, 'two').writable,
|
||||
false
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user