Permalink
Browse files

Fix some trailing commas, so most tests (except RQL) pass on IE8 and …

…even IE7 (except where JSON is used)
  • Loading branch information...
1 parent 3d23553 commit 45b4301b82147e11f10d5432c2521dbcf9023162 @kriszyp kriszyp committed Feb 13, 2014
Showing with 11 additions and 10 deletions.
  1. +1 −1 RqlServer.js
  2. +1 −1 Validating.js
  3. +2 −3 tests/Memory.js
  4. +5 −3 tests/Model.js
  5. +2 −2 validators/UniqueValidator.js
View
@@ -1,6 +1,6 @@
define([
'rql/query',
- 'dojo/_base/declare',
+ 'dojo/_base/declare'
], function (rql, declare) {
return declare(null, {
// summary:
View
@@ -38,6 +38,6 @@ define(['./Store', 'dojo/when', 'dojo/_base/declare'], function (Store, when, de
return when(this.validate(object, true), function (object) {
return inheritedAdd.call(store, object, options);
});
- },
+ }
});
});
View
@@ -133,12 +133,11 @@ define([
id: 10,
name: 'ten'
});
- // due to a bug in geezer's type assertions, this will fail in IE
- assert.isNotObject(store.get(10));
+ assert.strictEqual(store.get(10), undefined);
newObject.save();
assert.isObject(store.get(10));
newObject.remove();
- assert.isNotObject(store.get(10));
+ assert.strictEqual(store.get(10), undefined);
},
'add duplicate': function () {
View
@@ -50,7 +50,6 @@ define([
'#get and #set': function () {
var model = createPopulatedModel();
-
assert.strictEqual(model.get('string'), 'foo', 'string schema properties should be mutable as strings from an object');
assert.strictEqual(model.get('number'), 1234, 'number schema properties should be mutable as numbers from an object');
assert.strictEqual(model.get('boolean'), true, 'boolean schema properties should be mutable as booleans from an object');
@@ -90,8 +89,11 @@ define([
model.set('object', 'foo');
assert.instanceOf(model.get('object'), Object,
'Object schema properties should still be Objects even if passed a non-Object value');
- assert.deepEqual(model.get('object'), { 0: 'f', 1: 'o', 2: 'o' },
- 'Object schema properties should still be set even if passed a non-Object value');
+ // Object('string') doesn't really seem to convert properly in IE8
+ if (Object('test')[0]) {
+ assert.deepEqual(model.get('object'), { 0: 'f', 1: 'o', 2: 'o' },
+ 'Object schema properties should still be set even if passed a non-Object value');
+ }
model.set('array', 'foo');
assert.instanceOf(model.get('array'), Array, 'Array schema properties should still be Arrays even if passed a non-Array value');
@@ -1,7 +1,7 @@
define([
'dojo/_base/declare',
'dojo/when',
- '../Property',
+ '../Property'
], function (declare, when, Property) {
return declare(Property, {
// summary:
@@ -27,7 +27,7 @@ define([
uniqueStore: null,
// uniqueError: String
// The error message for when the value is not unique
- uniqueError: 'The value is not unique',
+ uniqueError: 'The value is not unique'
});
});

0 comments on commit 45b4301

Please sign in to comment.