mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 12:56:34 -04:00
18 lines
356 B
JavaScript
18 lines
356 B
JavaScript
'use strict';
|
|
|
|
var assert = require('chai').assert;
|
|
|
|
/**
|
|
* @param {Object} object
|
|
* @param {Array} properties
|
|
* @return {void}
|
|
*/
|
|
module.exports.checkReadOnly = function(object, properties) {
|
|
properties.forEach(function(property) {
|
|
assert.strictEqual(
|
|
Object.getOwnPropertyDescriptor(object, property).writable,
|
|
false
|
|
);
|
|
});
|
|
};
|