@fluid-experimental/property-changeset 0.59.2000 → 0.59.3000-67119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/changeset.d.ts.map +1 -1
  2. package/dist/changeset.js +50 -50
  3. package/dist/changeset.js.map +1 -1
  4. package/dist/changeset_operations/array.d.ts.map +1 -1
  5. package/dist/changeset_operations/array.js +22 -22
  6. package/dist/changeset_operations/array.js.map +1 -1
  7. package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
  8. package/dist/changeset_operations/arrayChangesetIterator.js +3 -3
  9. package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
  10. package/dist/changeset_operations/indexedCollection.js +21 -21
  11. package/dist/changeset_operations/indexedCollection.js.map +1 -1
  12. package/dist/changeset_operations/isEmptyChangeset.js +2 -2
  13. package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/pathHelper.js.map +1 -1
  17. package/dist/rebase.js +6 -6
  18. package/dist/rebase.js.map +1 -1
  19. package/dist/templateSchema.d.ts.map +1 -1
  20. package/dist/templateSchema.js +1 -0
  21. package/dist/templateSchema.js.map +1 -1
  22. package/dist/templateValidator.d.ts.map +1 -1
  23. package/dist/templateValidator.js +32 -32
  24. package/dist/templateValidator.js.map +1 -1
  25. package/dist/test/array.spec.js +40 -40
  26. package/dist/test/array.spec.js.map +1 -1
  27. package/dist/test/pathHelper.spec.js +147 -147
  28. package/dist/test/pathHelper.spec.js.map +1 -1
  29. package/dist/test/reversibleCs.spec.js +2 -2
  30. package/dist/test/reversibleCs.spec.js.map +1 -1
  31. package/dist/test/tsconfig.tsbuildinfo +1 -1660
  32. package/dist/test/validator/templateSyntax.spec.js +29 -29
  33. package/dist/test/validator/templateSyntax.spec.js.map +1 -1
  34. package/dist/test/validator/templateValidator.spec.js +202 -202
  35. package/dist/test/validator/templateValidator.spec.js.map +1 -1
  36. package/dist/test/validator/typeidHelper.spec.js +39 -39
  37. package/dist/test/validator/typeidHelper.spec.js.map +1 -1
  38. package/dist/utils.d.ts.map +1 -1
  39. package/dist/utils.js +41 -41
  40. package/dist/utils.js.map +1 -1
  41. package/lib/changeset.js.map +1 -1
  42. package/lib/changeset_operations/array.js.map +1 -1
  43. package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
  44. package/lib/changeset_operations/indexedCollection.js.map +1 -1
  45. package/lib/index.js.map +1 -1
  46. package/lib/pathHelper.js.map +1 -1
  47. package/lib/rebase.js.map +1 -1
  48. package/lib/templateSchema.js +1 -0
  49. package/lib/templateSchema.js.map +1 -1
  50. package/lib/templateValidator.js +1 -1
  51. package/lib/templateValidator.js.map +1 -1
  52. package/lib/utils.js.map +1 -1
  53. package/package.json +4 -4
@@ -21,7 +21,7 @@ const templateValidator_1 = require("../../templateValidator");
21
21
  if (async) {
22
22
  // @ts-ignore
23
23
  return schemaValidator.validate(template, templatePrevious, async, skipSemver).catch((error) => {
24
- chai_1.expect(error.message).to.have.string(asyncErrorMessage);
24
+ (0, chai_1.expect)(error.message).to.have.string(asyncErrorMessage);
25
25
  });
26
26
  }
27
27
  else {
@@ -42,18 +42,18 @@ const templateValidator_1 = require("../../templateValidator");
42
42
  describe('input validation', function () {
43
43
  it('fail: empty template', function () {
44
44
  let expectations = function (result) {
45
- chai_1.expect(result).property('isValid', false);
46
- chai_1.expect(result.errors.length).to.be.at.least(1);
47
- chai_1.expect(result.errors[0].message).to.have.string(MSG.NO_TEMPLATE);
45
+ (0, chai_1.expect)(result).property('isValid', false);
46
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
47
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.NO_TEMPLATE);
48
48
  return result;
49
49
  };
50
50
  return validate(expectations);
51
51
  });
52
52
  it('fail: template with no typeid', function () {
53
53
  let expectations = function (result) {
54
- chai_1.expect(result).property('isValid', false);
55
- chai_1.expect(result.errors.length).to.be.at.least(1);
56
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MISSING_TYPE_ID);
54
+ (0, chai_1.expect)(result).property('isValid', false);
55
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
56
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MISSING_TYPE_ID);
57
57
  return result;
58
58
  };
59
59
  return validate(expectations, {});
@@ -64,10 +64,10 @@ const templateValidator_1 = require("../../templateValidator");
64
64
  it('pass: valid typeid', function () {
65
65
  let template = JSON.parse(JSON.stringify(require('../schemas/goodPointId')));
66
66
  let expectations = function (result) {
67
- chai_1.expect(result).property('isValid', true);
68
- chai_1.expect(result.typeid).to.equal(template.typeid);
69
- chai_1.expect(result.errors).to.be.empty;
70
- chai_1.expect(result.warnings).to.be.empty;
67
+ (0, chai_1.expect)(result).property('isValid', true);
68
+ (0, chai_1.expect)(result.typeid).to.equal(template.typeid);
69
+ (0, chai_1.expect)(result.errors).to.be.empty;
70
+ (0, chai_1.expect)(result.warnings).to.be.empty;
71
71
  return result;
72
72
  };
73
73
  return validate(expectations, template);
@@ -75,11 +75,11 @@ const templateValidator_1 = require("../../templateValidator");
75
75
  it('fail: missing semver', function () {
76
76
  let template = JSON.parse(JSON.stringify(require('../schemas/badMissingSemverInTypeid')));
77
77
  let expectations = function (result) {
78
- chai_1.expect(result).property('isValid', false);
79
- chai_1.expect(result.typeid).to.equal(template.typeid);
80
- chai_1.expect(result.errors.length).to.be.at.least(1);
81
- chai_1.expect(result.errors[0].message).to.have.string('\'TeamLeoValidation2:PointID\' is not valid');
82
- chai_1.expect(result.errors[0].dataPath).to.equal('/typeid');
78
+ (0, chai_1.expect)(result).property('isValid', false);
79
+ (0, chai_1.expect)(result.typeid).to.equal(template.typeid);
80
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
81
+ (0, chai_1.expect)(result.errors[0].message).to.have.string('\'TeamLeoValidation2:PointID\' is not valid');
82
+ (0, chai_1.expect)(result.errors[0].dataPath).to.equal('/typeid');
83
83
  return result;
84
84
  };
85
85
  return validate(expectations, template);
@@ -87,10 +87,10 @@ const templateValidator_1 = require("../../templateValidator");
87
87
  it('fail: invalid semver 1', function () {
88
88
  let template = JSON.parse(JSON.stringify(require('../schemas/badInvalidSemverInTypeid')));
89
89
  let expectations = function (result) {
90
- chai_1.expect(result).property('isValid', false);
91
- chai_1.expect(result.typeid).to.equal(template.typeid);
92
- chai_1.expect(result.errors.length).to.be.at.least(1);
93
- chai_1.expect(result.errors[0].dataPath).to.equal('/typeid');
90
+ (0, chai_1.expect)(result).property('isValid', false);
91
+ (0, chai_1.expect)(result.typeid).to.equal(template.typeid);
92
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
93
+ (0, chai_1.expect)(result.errors[0].dataPath).to.equal('/typeid');
94
94
  return result;
95
95
  };
96
96
  return validate(expectations, template);
@@ -99,10 +99,10 @@ const templateValidator_1 = require("../../templateValidator");
99
99
  let template = JSON.parse(JSON.stringify(require('../schemas/badInvalidSemverInTypeid')));
100
100
  template.typeid = 'TeamLeoValidation2:PointID-1.0.01';
101
101
  let expectations = function (result) {
102
- chai_1.expect(result).property('isValid', false);
103
- chai_1.expect(result.typeid).to.equal(template.typeid);
104
- chai_1.expect(result.errors.length).to.be.at.least(1);
105
- chai_1.expect(result.errors[0].message).to.have.string(MSG.INVALID_VERSION_1);
102
+ (0, chai_1.expect)(result).property('isValid', false);
103
+ (0, chai_1.expect)(result.typeid).to.equal(template.typeid);
104
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
105
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.INVALID_VERSION_1);
106
106
  return result;
107
107
  };
108
108
  return validate(expectations, template);
@@ -113,10 +113,10 @@ const templateValidator_1 = require("../../templateValidator");
113
113
  let badTypeId = 'TeamLeoValidation2:PointID-1.0.0.1';
114
114
  templatePrevious.typeid = badTypeId;
115
115
  let expectations = function (result) {
116
- chai_1.expect(result).property('isValid', false);
117
- chai_1.expect(result.typeid).to.equal(badTypeId);
118
- chai_1.expect(result.errors.length).to.be.at.least(1);
119
- chai_1.expect(result.errors[0].message).to.have.string(`'${badTypeId}' is not valid`);
116
+ (0, chai_1.expect)(result).property('isValid', false);
117
+ (0, chai_1.expect)(result.typeid).to.equal(badTypeId);
118
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
119
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(`'${badTypeId}' is not valid`);
120
120
  return result;
121
121
  };
122
122
  return validate(expectations, template, templatePrevious, false, 'Invalid Version: 1.0.0.1');
@@ -129,9 +129,9 @@ const templateValidator_1 = require("../../templateValidator");
129
129
  let template = JSON.parse(JSON.stringify(templatePrevious));
130
130
  template.typeid = 'TeamLeoValidation2:PointID-0.9.9';
131
131
  let expectations = function (result) {
132
- chai_1.expect(result).property('isValid', false);
133
- chai_1.expect(result.errors.length).to.be.at.least(1);
134
- chai_1.expect(result.errors[0].message).to.have.string(MSG.VERSION_REGRESSION_1);
132
+ (0, chai_1.expect)(result).property('isValid', false);
133
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
134
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.VERSION_REGRESSION_1);
135
135
  return result;
136
136
  };
137
137
  return validate(expectations, template, templatePrevious);
@@ -141,9 +141,9 @@ const templateValidator_1 = require("../../templateValidator");
141
141
  let templatePrevious = JSON.parse(JSON.stringify(require('../schemas/goodPointId')));
142
142
  let template = JSON.parse(JSON.stringify(templatePrevious));
143
143
  let expectations = function (result) {
144
- chai_1.expect(result).property('isValid', true);
145
- chai_1.expect(result.errors).to.be.empty;
146
- chai_1.expect(result.warnings).to.be.empty;
144
+ (0, chai_1.expect)(result).property('isValid', true);
145
+ (0, chai_1.expect)(result.errors).to.be.empty;
146
+ (0, chai_1.expect)(result.warnings).to.be.empty;
147
147
  return result;
148
148
  };
149
149
  return validate(expectations, template, templatePrevious);
@@ -154,9 +154,9 @@ const templateValidator_1 = require("../../templateValidator");
154
154
  let template = JSON.parse(JSON.stringify(templatePrevious));
155
155
  template.annotation.description = 'Changed!';
156
156
  let expectations = function (result) {
157
- chai_1.expect(result).property('isValid', false);
158
- chai_1.expect(result.errors.length).to.be.at.least(1);
159
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
157
+ (0, chai_1.expect)(result).property('isValid', false);
158
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
159
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
160
160
  return result;
161
161
  };
162
162
  return validate(expectations, template, templatePrevious);
@@ -167,9 +167,9 @@ const templateValidator_1 = require("../../templateValidator");
167
167
  let template = JSON.parse(JSON.stringify(templatePrevious));
168
168
  delete template.annotation;
169
169
  let expectations = function (result) {
170
- chai_1.expect(result).property('isValid', false);
171
- chai_1.expect(result.errors.length).to.be.at.least(1);
172
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
170
+ (0, chai_1.expect)(result).property('isValid', false);
171
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
172
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
173
173
  return result;
174
174
  };
175
175
  return validate(expectations, template, templatePrevious);
@@ -179,9 +179,9 @@ const templateValidator_1 = require("../../templateValidator");
179
179
  let template = JSON.parse(JSON.stringify(templatePrevious));
180
180
  template.annotation = { description: 'Test' };
181
181
  let expectations = function (result) {
182
- chai_1.expect(result).property('isValid', false);
183
- chai_1.expect(result.errors.length).to.be.at.least(1);
184
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
182
+ (0, chai_1.expect)(result).property('isValid', false);
183
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
184
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
185
185
  return result;
186
186
  };
187
187
  return validate(expectations, template, templatePrevious);
@@ -191,9 +191,9 @@ const templateValidator_1 = require("../../templateValidator");
191
191
  let template = JSON.parse(JSON.stringify(templatePrevious));
192
192
  template.properties[0].properties[0].value = 123456;
193
193
  let expectations = function (result) {
194
- chai_1.expect(result).property('isValid', false);
195
- chai_1.expect(result.errors.length).to.be.at.least(1);
196
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
194
+ (0, chai_1.expect)(result).property('isValid', false);
195
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
196
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
197
197
  return result;
198
198
  };
199
199
  return validate(expectations, template, templatePrevious);
@@ -203,9 +203,9 @@ const templateValidator_1 = require("../../templateValidator");
203
203
  let template = JSON.parse(JSON.stringify(templatePrevious));
204
204
  template.properties[0].properties[0].id = 'xx';
205
205
  let expectations = function (result) {
206
- chai_1.expect(result).property('isValid', false);
207
- chai_1.expect(result.errors.length).to.be.at.least(1);
208
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
206
+ (0, chai_1.expect)(result).property('isValid', false);
207
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
208
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
209
209
  return result;
210
210
  };
211
211
  return validate(expectations, template, templatePrevious);
@@ -215,9 +215,9 @@ const templateValidator_1 = require("../../templateValidator");
215
215
  let template = JSON.parse(JSON.stringify(templatePrevious));
216
216
  template.inherits = 'Reference<Adsk.Core:Math.Color-1.0.0>';
217
217
  let expectations = function (result) {
218
- chai_1.expect(result).property('isValid', false);
219
- chai_1.expect(result.errors.length).to.be.at.least(1);
220
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
218
+ (0, chai_1.expect)(result).property('isValid', false);
219
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
220
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
221
221
  return result;
222
222
  };
223
223
  return validate(expectations, template, templatePrevious);
@@ -228,9 +228,9 @@ const templateValidator_1 = require("../../templateValidator");
228
228
  let template = JSON.parse(JSON.stringify(templatePrevious));
229
229
  template.properties[0].properties.push({ 'id': 'newPropId', 'typeid': 'Float32' });
230
230
  let expectations = function (result) {
231
- chai_1.expect(result).property('isValid', false);
232
- chai_1.expect(result.errors.length).to.be.at.least(1);
233
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
231
+ (0, chai_1.expect)(result).property('isValid', false);
232
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
233
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
234
234
  return result;
235
235
  };
236
236
  return validate(expectations, template, templatePrevious);
@@ -241,9 +241,9 @@ const templateValidator_1 = require("../../templateValidator");
241
241
  let template = JSON.parse(JSON.stringify(templatePrevious));
242
242
  template.properties[0].properties.pop();
243
243
  let expectations = function (result) {
244
- chai_1.expect(result).property('isValid', false);
245
- chai_1.expect(result.errors.length).to.be.at.least(1);
246
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
244
+ (0, chai_1.expect)(result).property('isValid', false);
245
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
246
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_SAME_VERSION_1);
247
247
  return result;
248
248
  };
249
249
  return validate(expectations, template, templatePrevious);
@@ -255,9 +255,9 @@ const templateValidator_1 = require("../../templateValidator");
255
255
  let template = JSON.parse(JSON.stringify(templatePrevious));
256
256
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'patch');
257
257
  let expectations = function (result) {
258
- chai_1.expect(result).property('isValid', true);
259
- chai_1.expect(result.errors).to.be.empty;
260
- chai_1.expect(result.warnings).to.be.empty;
258
+ (0, chai_1.expect)(result).property('isValid', true);
259
+ (0, chai_1.expect)(result.errors).to.be.empty;
260
+ (0, chai_1.expect)(result.warnings).to.be.empty;
261
261
  return result;
262
262
  };
263
263
  return validate(expectations, template, templatePrevious);
@@ -269,9 +269,9 @@ const templateValidator_1 = require("../../templateValidator");
269
269
  template.typeid = 'TeamLeoValidation2:PointID-0.0.2';
270
270
  template.properties[1].typeid = 'TeamLeoValidation2:ColorID-9.0.0';
271
271
  let expectations = function (result) {
272
- chai_1.expect(result).property('isValid', true);
273
- chai_1.expect(result.errors).to.be.empty;
274
- chai_1.expect(result.warnings).to.be.empty;
272
+ (0, chai_1.expect)(result).property('isValid', true);
273
+ (0, chai_1.expect)(result.errors).to.be.empty;
274
+ (0, chai_1.expect)(result.warnings).to.be.empty;
275
275
  return result;
276
276
  };
277
277
  return validate(expectations, template, templatePrevious);
@@ -283,9 +283,9 @@ const templateValidator_1 = require("../../templateValidator");
283
283
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'patch');
284
284
  template.annotation.description = 'Changed!';
285
285
  let expectations = function (result) {
286
- chai_1.expect(result).property('isValid', true);
287
- chai_1.expect(result.errors).to.be.empty;
288
- chai_1.expect(result.warnings).to.be.empty;
286
+ (0, chai_1.expect)(result).property('isValid', true);
287
+ (0, chai_1.expect)(result.errors).to.be.empty;
288
+ (0, chai_1.expect)(result.warnings).to.be.empty;
289
289
  return result;
290
290
  };
291
291
  return validate(expectations, template, templatePrevious);
@@ -297,9 +297,9 @@ const templateValidator_1 = require("../../templateValidator");
297
297
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'patch');
298
298
  delete template.annotation;
299
299
  let expectations = function (result) {
300
- chai_1.expect(result).property('isValid', true);
301
- chai_1.expect(result.errors).to.be.empty;
302
- chai_1.expect(result.warnings).to.be.empty;
300
+ (0, chai_1.expect)(result).property('isValid', true);
301
+ (0, chai_1.expect)(result.errors).to.be.empty;
302
+ (0, chai_1.expect)(result.warnings).to.be.empty;
303
303
  return result;
304
304
  };
305
305
  return validate(expectations, template, templatePrevious);
@@ -310,9 +310,9 @@ const templateValidator_1 = require("../../templateValidator");
310
310
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'patch');
311
311
  template.annotation = { description: 'Test' };
312
312
  let expectations = function (result) {
313
- chai_1.expect(result).property('isValid', true);
314
- chai_1.expect(result.errors).to.be.empty;
315
- chai_1.expect(result.warnings).to.be.empty;
313
+ (0, chai_1.expect)(result).property('isValid', true);
314
+ (0, chai_1.expect)(result.errors).to.be.empty;
315
+ (0, chai_1.expect)(result.warnings).to.be.empty;
316
316
  return result;
317
317
  };
318
318
  return validate(expectations, template, templatePrevious);
@@ -323,10 +323,10 @@ const templateValidator_1 = require("../../templateValidator");
323
323
  template.typeid = 'Adsk.Core:UI.Border-' + semver.inc('1.0.0', 'patch');
324
324
  template.properties[0].properties[0].value = 123456;
325
325
  let expectations = function (result) {
326
- chai_1.expect(result).property('isValid', true);
327
- chai_1.expect(result.errors).to.be.empty;
328
- chai_1.expect(result.warnings.length).to.be.at.least(1);
329
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
326
+ (0, chai_1.expect)(result).property('isValid', true);
327
+ (0, chai_1.expect)(result.errors).to.be.empty;
328
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(1);
329
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
330
330
  return result;
331
331
  };
332
332
  return validate(expectations, template, templatePrevious);
@@ -337,10 +337,10 @@ const templateValidator_1 = require("../../templateValidator");
337
337
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'patch');
338
338
  template.properties[0].properties[0].id = 'xx';
339
339
  let expectations = function (result) {
340
- chai_1.expect(result).property('isValid', true);
341
- chai_1.expect(result.errors).to.be.empty;
342
- chai_1.expect(result.warnings.length).to.be.at.least(2); // 1st for the delete and the 2nd for the add
343
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
340
+ (0, chai_1.expect)(result).property('isValid', true);
341
+ (0, chai_1.expect)(result.errors).to.be.empty;
342
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(2); // 1st for the delete and the 2nd for the add
343
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
344
344
  return result;
345
345
  };
346
346
  return validate(expectations, template, templatePrevious);
@@ -351,10 +351,10 @@ const templateValidator_1 = require("../../templateValidator");
351
351
  template.typeid = 'TeamLeoValidation2:Example-' + semver.inc('1.0.0', 'patch');
352
352
  template.inherits = 'Reference<Adsk.Core:Math.Color-1.0.0>';
353
353
  let expectations = function (result) {
354
- chai_1.expect(result).property('isValid', true);
355
- chai_1.expect(result.errors).to.be.empty;
356
- chai_1.expect(result.warnings.length).to.be.at.least(1);
357
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
354
+ (0, chai_1.expect)(result).property('isValid', true);
355
+ (0, chai_1.expect)(result.errors).to.be.empty;
356
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(1);
357
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
358
358
  return result;
359
359
  };
360
360
  return validate(expectations, template, templatePrevious);
@@ -366,10 +366,10 @@ const templateValidator_1 = require("../../templateValidator");
366
366
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'patch');
367
367
  template.properties[0].properties.push({ 'id': 'newPropId', 'typeid': 'Float32' });
368
368
  let expectations = function (result) {
369
- chai_1.expect(result).property('isValid', true);
370
- chai_1.expect(result.errors).to.be.empty;
371
- chai_1.expect(result.warnings.length).to.be.at.least(1);
372
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
369
+ (0, chai_1.expect)(result).property('isValid', true);
370
+ (0, chai_1.expect)(result.errors).to.be.empty;
371
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(1);
372
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
373
373
  return result;
374
374
  };
375
375
  return validate(expectations, template, templatePrevious);
@@ -381,10 +381,10 @@ const templateValidator_1 = require("../../templateValidator");
381
381
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'patch');
382
382
  template.properties[0].properties.pop();
383
383
  let expectations = function (result) {
384
- chai_1.expect(result).property('isValid', true);
385
- chai_1.expect(result.errors).to.be.empty;
386
- chai_1.expect(result.warnings.length).to.be.at.least(1);
387
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
384
+ (0, chai_1.expect)(result).property('isValid', true);
385
+ (0, chai_1.expect)(result.errors).to.be.empty;
386
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(1);
387
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
388
388
  return result;
389
389
  };
390
390
  return validate(expectations, template, templatePrevious);
@@ -396,9 +396,9 @@ const templateValidator_1 = require("../../templateValidator");
396
396
  let template = JSON.parse(JSON.stringify(templatePrevious));
397
397
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'minor');
398
398
  let expectations = function (result) {
399
- chai_1.expect(result).property('isValid', true);
400
- chai_1.expect(result.errors).to.be.empty;
401
- chai_1.expect(result.warnings).to.be.empty;
399
+ (0, chai_1.expect)(result).property('isValid', true);
400
+ (0, chai_1.expect)(result.errors).to.be.empty;
401
+ (0, chai_1.expect)(result.warnings).to.be.empty;
402
402
  return result;
403
403
  };
404
404
  return validate(expectations, template, templatePrevious);
@@ -410,9 +410,9 @@ const templateValidator_1 = require("../../templateValidator");
410
410
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'minor');
411
411
  template.annotation.description = 'Changed!';
412
412
  let expectations = function (result) {
413
- chai_1.expect(result).property('isValid', true);
414
- chai_1.expect(result.errors).to.be.empty;
415
- chai_1.expect(result.warnings).to.be.empty;
413
+ (0, chai_1.expect)(result).property('isValid', true);
414
+ (0, chai_1.expect)(result.errors).to.be.empty;
415
+ (0, chai_1.expect)(result.warnings).to.be.empty;
416
416
  return result;
417
417
  };
418
418
  return validate(expectations, template, templatePrevious);
@@ -424,9 +424,9 @@ const templateValidator_1 = require("../../templateValidator");
424
424
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'minor');
425
425
  delete template.annotation;
426
426
  let expectations = function (result) {
427
- chai_1.expect(result).property('isValid', true);
428
- chai_1.expect(result.errors).to.be.empty;
429
- chai_1.expect(result.warnings).to.be.empty;
427
+ (0, chai_1.expect)(result).property('isValid', true);
428
+ (0, chai_1.expect)(result.errors).to.be.empty;
429
+ (0, chai_1.expect)(result.warnings).to.be.empty;
430
430
  return result;
431
431
  };
432
432
  return validate(expectations, template, templatePrevious);
@@ -437,9 +437,9 @@ const templateValidator_1 = require("../../templateValidator");
437
437
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'minor');
438
438
  template.annotation = { description: 'Test' };
439
439
  let expectations = function (result) {
440
- chai_1.expect(result).property('isValid', true);
441
- chai_1.expect(result.errors).to.be.empty;
442
- chai_1.expect(result.warnings).to.be.empty;
440
+ (0, chai_1.expect)(result).property('isValid', true);
441
+ (0, chai_1.expect)(result.errors).to.be.empty;
442
+ (0, chai_1.expect)(result.warnings).to.be.empty;
443
443
  return result;
444
444
  };
445
445
  return validate(expectations, template, templatePrevious);
@@ -450,9 +450,9 @@ const templateValidator_1 = require("../../templateValidator");
450
450
  template.typeid = 'Adsk.Core:UI.Border-' + semver.inc('1.0.0', 'minor');
451
451
  template.properties[0].properties[0].value = 123456;
452
452
  let expectations = function (result) {
453
- chai_1.expect(result).property('isValid', true);
454
- chai_1.expect(result.errors).to.be.empty;
455
- chai_1.expect(result.warnings).to.be.empty;
453
+ (0, chai_1.expect)(result).property('isValid', true);
454
+ (0, chai_1.expect)(result.errors).to.be.empty;
455
+ (0, chai_1.expect)(result.warnings).to.be.empty;
456
456
  return result;
457
457
  };
458
458
  return validate(expectations, template, templatePrevious);
@@ -463,10 +463,10 @@ const templateValidator_1 = require("../../templateValidator");
463
463
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'minor');
464
464
  template.properties[0].properties[0].id = 'xx';
465
465
  let expectations = function (result) {
466
- chai_1.expect(result).property('isValid', true);
467
- chai_1.expect(result.errors).to.be.empty;
468
- chai_1.expect(result.warnings.length).to.be.at.least(1);
469
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
466
+ (0, chai_1.expect)(result).property('isValid', true);
467
+ (0, chai_1.expect)(result.errors).to.be.empty;
468
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(1);
469
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
470
470
  return result;
471
471
  };
472
472
  return validate(expectations, template, templatePrevious);
@@ -477,10 +477,10 @@ const templateValidator_1 = require("../../templateValidator");
477
477
  template.typeid = 'TeamLeoValidation2:Example-' + semver.inc('1.0.0', 'minor');
478
478
  template.inherits = 'Reference<Adsk.Core:Math.Color-1.0.0>';
479
479
  let expectations = function (result) {
480
- chai_1.expect(result).property('isValid', true);
481
- chai_1.expect(result.errors).to.be.empty;
482
- chai_1.expect(result.warnings.length).to.be.at.least(1);
483
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
480
+ (0, chai_1.expect)(result).property('isValid', true);
481
+ (0, chai_1.expect)(result.errors).to.be.empty;
482
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(1);
483
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
484
484
  return result;
485
485
  };
486
486
  return validate(expectations, template, templatePrevious);
@@ -492,9 +492,9 @@ const templateValidator_1 = require("../../templateValidator");
492
492
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'minor');
493
493
  template.properties[0].properties.push({ 'id': 'newPropId', 'typeid': 'Float32' });
494
494
  let expectations = function (result) {
495
- chai_1.expect(result).property('isValid', true);
496
- chai_1.expect(result.errors).to.be.empty;
497
- chai_1.expect(result.warnings).to.be.empty;
495
+ (0, chai_1.expect)(result).property('isValid', true);
496
+ (0, chai_1.expect)(result.errors).to.be.empty;
497
+ (0, chai_1.expect)(result.warnings).to.be.empty;
498
498
  return result;
499
499
  };
500
500
  return validate(expectations, template, templatePrevious);
@@ -506,10 +506,10 @@ const templateValidator_1 = require("../../templateValidator");
506
506
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'minor');
507
507
  template.properties[0].properties.pop();
508
508
  let expectations = function (result) {
509
- chai_1.expect(result).property('isValid', true);
510
- chai_1.expect(result.errors).to.be.empty;
511
- chai_1.expect(result.warnings.length).to.be.at.least(1);
512
- chai_1.expect(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
509
+ (0, chai_1.expect)(result).property('isValid', true);
510
+ (0, chai_1.expect)(result.errors).to.be.empty;
511
+ (0, chai_1.expect)(result.warnings.length).to.be.at.least(1);
512
+ (0, chai_1.expect)(result.warnings[0]).to.have.string(MSG.CHANGE_LEVEL_TOO_LOW_1);
513
513
  return result;
514
514
  };
515
515
  return validate(expectations, template, templatePrevious);
@@ -521,9 +521,9 @@ const templateValidator_1 = require("../../templateValidator");
521
521
  let template = JSON.parse(JSON.stringify(templatePrevious));
522
522
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'major');
523
523
  let expectations = function (result) {
524
- chai_1.expect(result).property('isValid', true);
525
- chai_1.expect(result.errors).to.be.empty;
526
- chai_1.expect(result.warnings).to.be.empty;
524
+ (0, chai_1.expect)(result).property('isValid', true);
525
+ (0, chai_1.expect)(result.errors).to.be.empty;
526
+ (0, chai_1.expect)(result.warnings).to.be.empty;
527
527
  return result;
528
528
  };
529
529
  return validate(expectations, template, templatePrevious);
@@ -535,9 +535,9 @@ const templateValidator_1 = require("../../templateValidator");
535
535
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'major');
536
536
  template.annotation.description = 'Changed!';
537
537
  let expectations = function (result) {
538
- chai_1.expect(result).property('isValid', true);
539
- chai_1.expect(result.errors).to.be.empty;
540
- chai_1.expect(result.warnings).to.be.empty;
538
+ (0, chai_1.expect)(result).property('isValid', true);
539
+ (0, chai_1.expect)(result.errors).to.be.empty;
540
+ (0, chai_1.expect)(result.warnings).to.be.empty;
541
541
  return result;
542
542
  };
543
543
  return validate(expectations, template, templatePrevious);
@@ -549,9 +549,9 @@ const templateValidator_1 = require("../../templateValidator");
549
549
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'major');
550
550
  delete template.annotation;
551
551
  let expectations = function (result) {
552
- chai_1.expect(result).property('isValid', true);
553
- chai_1.expect(result.errors).to.be.empty;
554
- chai_1.expect(result.warnings).to.be.empty;
552
+ (0, chai_1.expect)(result).property('isValid', true);
553
+ (0, chai_1.expect)(result.errors).to.be.empty;
554
+ (0, chai_1.expect)(result.warnings).to.be.empty;
555
555
  return result;
556
556
  };
557
557
  return validate(expectations, template, templatePrevious);
@@ -562,9 +562,9 @@ const templateValidator_1 = require("../../templateValidator");
562
562
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'major');
563
563
  template.annotation = { description: 'Test' };
564
564
  let expectations = function (result) {
565
- chai_1.expect(result).property('isValid', true);
566
- chai_1.expect(result.errors).to.be.empty;
567
- chai_1.expect(result.warnings).to.be.empty;
565
+ (0, chai_1.expect)(result).property('isValid', true);
566
+ (0, chai_1.expect)(result.errors).to.be.empty;
567
+ (0, chai_1.expect)(result.warnings).to.be.empty;
568
568
  return result;
569
569
  };
570
570
  return validate(expectations, template, templatePrevious);
@@ -575,9 +575,9 @@ const templateValidator_1 = require("../../templateValidator");
575
575
  template.typeid = 'Adsk.Core:UI.Border-' + semver.inc('1.0.0', 'major');
576
576
  template.properties[0].properties[0].value = 123456;
577
577
  let expectations = function (result) {
578
- chai_1.expect(result).property('isValid', true);
579
- chai_1.expect(result.errors).to.be.empty;
580
- chai_1.expect(result.warnings).to.be.empty;
578
+ (0, chai_1.expect)(result).property('isValid', true);
579
+ (0, chai_1.expect)(result.errors).to.be.empty;
580
+ (0, chai_1.expect)(result.warnings).to.be.empty;
581
581
  return result;
582
582
  };
583
583
  return validate(expectations, template, templatePrevious);
@@ -588,9 +588,9 @@ const templateValidator_1 = require("../../templateValidator");
588
588
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'major');
589
589
  template.properties[0].properties[0].id = 'xx';
590
590
  let expectations = function (result) {
591
- chai_1.expect(result).property('isValid', true);
592
- chai_1.expect(result.errors).to.be.empty;
593
- chai_1.expect(result.warnings).to.be.empty;
591
+ (0, chai_1.expect)(result).property('isValid', true);
592
+ (0, chai_1.expect)(result.errors).to.be.empty;
593
+ (0, chai_1.expect)(result.warnings).to.be.empty;
594
594
  return result;
595
595
  };
596
596
  return validate(expectations, template, templatePrevious);
@@ -601,9 +601,9 @@ const templateValidator_1 = require("../../templateValidator");
601
601
  template.typeid = 'TeamLeoValidation2:Example-' + semver.inc('1.0.0', 'major');
602
602
  template.inherits = 'Reference<Adsk.Core:Math.Color-1.0.0>';
603
603
  let expectations = function (result) {
604
- chai_1.expect(result).property('isValid', true);
605
- chai_1.expect(result.errors).to.be.empty;
606
- chai_1.expect(result.warnings).to.be.empty;
604
+ (0, chai_1.expect)(result).property('isValid', true);
605
+ (0, chai_1.expect)(result.errors).to.be.empty;
606
+ (0, chai_1.expect)(result.warnings).to.be.empty;
607
607
  return result;
608
608
  };
609
609
  return validate(expectations, template, templatePrevious);
@@ -615,9 +615,9 @@ const templateValidator_1 = require("../../templateValidator");
615
615
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'major');
616
616
  template.properties[0].properties.push({ 'id': 'newPropId', 'typeid': 'Float32' });
617
617
  let expectations = function (result) {
618
- chai_1.expect(result).property('isValid', true);
619
- chai_1.expect(result.errors).to.be.empty;
620
- chai_1.expect(result.warnings).to.be.empty;
618
+ (0, chai_1.expect)(result).property('isValid', true);
619
+ (0, chai_1.expect)(result.errors).to.be.empty;
620
+ (0, chai_1.expect)(result.warnings).to.be.empty;
621
621
  return result;
622
622
  };
623
623
  return validate(expectations, template, templatePrevious);
@@ -629,9 +629,9 @@ const templateValidator_1 = require("../../templateValidator");
629
629
  template.typeid = 'TeamLeoValidation2:PointID-' + semver.inc('1.0.0', 'major');
630
630
  template.properties[0].properties.pop();
631
631
  let expectations = function (result) {
632
- chai_1.expect(result).property('isValid', true);
633
- chai_1.expect(result.errors).to.be.empty;
634
- chai_1.expect(result.warnings).to.be.empty;
632
+ (0, chai_1.expect)(result).property('isValid', true);
633
+ (0, chai_1.expect)(result.errors).to.be.empty;
634
+ (0, chai_1.expect)(result.warnings).to.be.empty;
635
635
  return result;
636
636
  };
637
637
  return validate(expectations, template, templatePrevious);
@@ -650,9 +650,9 @@ const templateValidator_1 = require("../../templateValidator");
650
650
  template.properties[2] = tmp;
651
651
  // Skip semver validation to cause a deep compare
652
652
  let expectations = function (result) {
653
- chai_1.expect(result).property('isValid', true);
654
- chai_1.expect(result.errors).to.be.empty;
655
- chai_1.expect(result.warnings).to.be.empty;
653
+ (0, chai_1.expect)(result).property('isValid', true);
654
+ (0, chai_1.expect)(result.errors).to.be.empty;
655
+ (0, chai_1.expect)(result.warnings).to.be.empty;
656
656
  return result;
657
657
  };
658
658
  return validate(expectations, template, templatePrevious, true);
@@ -661,9 +661,9 @@ const templateValidator_1 = require("../../templateValidator");
661
661
  let templatePrevious = JSON.parse(JSON.stringify(require('../schemas/goodPointId')));
662
662
  let template = JSON.parse(JSON.stringify(templatePrevious));
663
663
  let expectations = function (result) {
664
- chai_1.expect(result).property('isValid', true);
665
- chai_1.expect(result.errors).to.be.empty;
666
- chai_1.expect(result.warnings).to.be.empty;
664
+ (0, chai_1.expect)(result).property('isValid', true);
665
+ (0, chai_1.expect)(result.errors).to.be.empty;
666
+ (0, chai_1.expect)(result.warnings).to.be.empty;
667
667
  return result;
668
668
  };
669
669
  return validate(expectations, template, templatePrevious, true);
@@ -676,11 +676,11 @@ const templateValidator_1 = require("../../templateValidator");
676
676
  JSON.parse(JSON.stringify(template)),
677
677
  ];
678
678
  let expectations = function (result) {
679
- chai_1.expect(result).property('isValid', true);
680
- chai_1.expect(result.errors).to.be.empty;
681
- chai_1.expect(result.warnings).to.be.empty;
682
- chai_1.expect(templatePrevious).to.deep.equal(copies[0]);
683
- chai_1.expect(template).to.deep.equal(copies[1]);
679
+ (0, chai_1.expect)(result).property('isValid', true);
680
+ (0, chai_1.expect)(result.errors).to.be.empty;
681
+ (0, chai_1.expect)(result.warnings).to.be.empty;
682
+ (0, chai_1.expect)(templatePrevious).to.deep.equal(copies[0]);
683
+ (0, chai_1.expect)(template).to.deep.equal(copies[1]);
684
684
  return result;
685
685
  };
686
686
  return validate(expectations, template, templatePrevious);
@@ -690,10 +690,10 @@ const templateValidator_1 = require("../../templateValidator");
690
690
  let template = JSON.parse(JSON.stringify(templatePrevious));
691
691
  template.properties[0].properties[0].value = 123456;
692
692
  let expectations = function (result) {
693
- chai_1.expect(result).property('isValid', false);
694
- chai_1.expect(result.warnings).to.be.empty;
695
- chai_1.expect(result.errors.length).to.be.at.least(1);
696
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_1);
693
+ (0, chai_1.expect)(result).property('isValid', false);
694
+ (0, chai_1.expect)(result.warnings).to.be.empty;
695
+ (0, chai_1.expect)(result.errors.length).to.be.at.least(1);
696
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_1);
697
697
  return result;
698
698
  };
699
699
  return validate(expectations, template, templatePrevious, true);
@@ -703,7 +703,7 @@ const templateValidator_1 = require("../../templateValidator");
703
703
  it('pass: validate a simple file', function () {
704
704
  let template = require('../schemas/goodPointId');
705
705
  let expectations = function (result) {
706
- chai_1.expect(result.isValid).to.equal(true);
706
+ (0, chai_1.expect)(result.isValid).to.equal(true);
707
707
  return result;
708
708
  };
709
709
  return validate(expectations, template, null, true);
@@ -711,9 +711,9 @@ const templateValidator_1 = require("../../templateValidator");
711
711
  it('fail: invalid file', function () {
712
712
  let template = require('../schemas/badPrimitiveTypeid');
713
713
  let expectations = function (result) {
714
- chai_1.expect(result.isValid).to.equal(false);
715
- chai_1.expect(result.errors.length).to.be.greaterThan(0);
716
- chai_1.expect(result.unresolvedTypes.length).to.equal(1);
714
+ (0, chai_1.expect)(result.isValid).to.equal(false);
715
+ (0, chai_1.expect)(result.errors.length).to.be.greaterThan(0);
716
+ (0, chai_1.expect)(result.unresolvedTypes.length).to.equal(1);
717
717
  return result;
718
718
  };
719
719
  return validate(expectations, template, null, true);
@@ -724,7 +724,7 @@ const templateValidator_1 = require("../../templateValidator");
724
724
  properties: [],
725
725
  };
726
726
  let expectations = function (result) {
727
- chai_1.expect(result.isValid).to.equal(true);
727
+ (0, chai_1.expect)(result.isValid).to.equal(true);
728
728
  return result;
729
729
  };
730
730
  return validate(expectations, EmptyPropertySchema, null);
@@ -737,9 +737,9 @@ const templateValidator_1 = require("../../templateValidator");
737
737
  let templatePrevious = JSON.parse(templateString);
738
738
  let template = JSON.parse(templateString);
739
739
  let expectations = function (result) {
740
- chai_1.expect(result).property('isValid', true);
741
- chai_1.expect(result.errors).to.be.empty;
742
- chai_1.expect(result.warnings).to.be.empty;
740
+ (0, chai_1.expect)(result).property('isValid', true);
741
+ (0, chai_1.expect)(result.errors).to.be.empty;
742
+ (0, chai_1.expect)(result.warnings).to.be.empty;
743
743
  return result;
744
744
  };
745
745
  return validate(expectations, template, templatePrevious, true);
@@ -750,9 +750,9 @@ const templateValidator_1 = require("../../templateValidator");
750
750
  let templatePrevious = JSON.parse('{"typeid":"autodesk.core:translation.controller-1.0.0",' +
751
751
  '"inherits":["NodeProperty","NamedProperty"]}');
752
752
  let expectations = function (result) {
753
- chai_1.expect(result).property('isValid', false);
754
- chai_1.expect(result.errors.length).to.be.greaterThan(0);
755
- chai_1.expect(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_1);
753
+ (0, chai_1.expect)(result).property('isValid', false);
754
+ (0, chai_1.expect)(result.errors.length).to.be.greaterThan(0);
755
+ (0, chai_1.expect)(result.errors[0].message).to.have.string(MSG.MODIFIED_TEMPLATE_1);
756
756
  return result;
757
757
  };
758
758
  return validate(expectations, template, templatePrevious, true);
@@ -770,18 +770,18 @@ const templateValidator_1 = require("../../templateValidator");
770
770
  };
771
771
  it('source is abstract and target is an empty properties array', function () {
772
772
  let expectations = function (result) {
773
- chai_1.expect(result).property('isValid', true);
774
- chai_1.expect(result.errors).to.be.empty;
775
- chai_1.expect(result.warnings).to.be.empty;
773
+ (0, chai_1.expect)(result).property('isValid', true);
774
+ (0, chai_1.expect)(result.errors).to.be.empty;
775
+ (0, chai_1.expect)(result.warnings).to.be.empty;
776
776
  return result;
777
777
  };
778
778
  return validate(expectations, templateAbstract, templateArray);
779
779
  });
780
780
  it('target is abstract and source is an empty properties array', function () {
781
781
  let expectations = function (result) {
782
- chai_1.expect(result).property('isValid', true);
783
- chai_1.expect(result.errors).to.be.empty;
784
- chai_1.expect(result.warnings).to.be.empty;
782
+ (0, chai_1.expect)(result).property('isValid', true);
783
+ (0, chai_1.expect)(result.errors).to.be.empty;
784
+ (0, chai_1.expect)(result.warnings).to.be.empty;
785
785
  return result;
786
786
  };
787
787
  return validate(expectations, templateArray, templateAbstract);
@@ -800,9 +800,9 @@ const templateValidator_1 = require("../../templateValidator");
800
800
  });
801
801
  let expectationsGenerator = function (msg) {
802
802
  return function (result) {
803
- chai_1.expect(result.isValid).to.equal(false);
804
- chai_1.expect(result.errors.length).to.equal(1);
805
- chai_1.expect(result.errors[0].message).to.equal(msg);
803
+ (0, chai_1.expect)(result.isValid).to.equal(false);
804
+ (0, chai_1.expect)(result.errors.length).to.equal(1);
805
+ (0, chai_1.expect)(result.errors[0].message).to.equal(msg);
806
806
  return result;
807
807
  };
808
808
  };
@@ -812,7 +812,7 @@ const templateValidator_1 = require("../../templateValidator");
812
812
  constants: [{ id: 'valid', typeid: 'String', value: 'value' }],
813
813
  };
814
814
  let expectations = function (result) {
815
- chai_1.expect(result.isValid).to.equal(true);
815
+ (0, chai_1.expect)(result.isValid).to.equal(true);
816
816
  return result;
817
817
  };
818
818
  return validate(expectations, ConstantValid, null);
@@ -837,11 +837,11 @@ const templateValidator_1 = require("../../templateValidator");
837
837
  constants: [{ id: 'id', value: 'value' }],
838
838
  };
839
839
  return validate(function (result) {
840
- chai_1.expect(result.isValid).to.equal(false);
840
+ (0, chai_1.expect)(result.isValid).to.equal(false);
841
841
  // console.log(result.errors);
842
- chai_1.expect(result.errors.length).to.equal(5);
843
- chai_1.expect(result.errors[3].message).to.include("should have required property 'inherits'");
844
- chai_1.expect(result.errors[4].message).to.include("/constants/0 should have required property 'typeid'");
842
+ (0, chai_1.expect)(result.errors.length).to.equal(5);
843
+ (0, chai_1.expect)(result.errors[3].message).to.include("should have required property 'inherits'");
844
+ (0, chai_1.expect)(result.errors[4].message).to.include("/constants/0 should have required property 'typeid'");
845
845
  return result;
846
846
  }, ConstantNoTypeid, null, true);
847
847
  });
@@ -852,7 +852,7 @@ const templateValidator_1 = require("../../templateValidator");
852
852
  constants: [{ id: 'id', value: 'value' }],
853
853
  };
854
854
  let expectations = function (result) {
855
- chai_1.expect(result.isValid).to.equal(true);
855
+ (0, chai_1.expect)(result.isValid).to.equal(true);
856
856
  return result;
857
857
  };
858
858
  return validate(expectations, ConstantNoTypeid, null);
@@ -863,7 +863,7 @@ const templateValidator_1 = require("../../templateValidator");
863
863
  constants: [{ id: 'id', typeid: 'String' }],
864
864
  };
865
865
  let expectations = function (result) {
866
- chai_1.expect(result.isValid).to.equal(true);
866
+ (0, chai_1.expect)(result.isValid).to.equal(true);
867
867
  return result;
868
868
  };
869
869
  return validate(expectations, ConstantNoValue, null, true);
@@ -880,7 +880,7 @@ const templateValidator_1 = require("../../templateValidator");
880
880
  }],
881
881
  };
882
882
  let expectations = function (result) {
883
- chai_1.expect(result.isValid).to.equal(true);
883
+ (0, chai_1.expect)(result.isValid).to.equal(true);
884
884
  return result;
885
885
  };
886
886
  return validate(expectations, Constant, null, true);
@@ -897,9 +897,9 @@ const templateValidator_1 = require("../../templateValidator");
897
897
  }],
898
898
  };
899
899
  return validate(function (result) {
900
- chai_1.expect(result.isValid).to.equal(false);
901
- chai_1.expect(result.errors.length).to.equal(1);
902
- chai_1.expect(result.errors[0].message).to.include('should match one of the following: typeid,string');
900
+ (0, chai_1.expect)(result.isValid).to.equal(false);
901
+ (0, chai_1.expect)(result.errors.length).to.equal(1);
902
+ (0, chai_1.expect)(result.errors[0].message).to.include('should match one of the following: typeid,string');
903
903
  return result;
904
904
  }, ConstantNoValue, null, true);
905
905
  });
@@ -915,10 +915,10 @@ const templateValidator_1 = require("../../templateValidator");
915
915
  }],
916
916
  };
917
917
  let expectations = function (result) {
918
- chai_1.expect(result.isValid).to.equal(false);
919
- chai_1.expect(result.errors.length).to.equal(2);
920
- chai_1.expect(result.errors[0].message).to.include(MSG.KEY_MUST_BE_TYPEID + 'NotATypeId');
921
- chai_1.expect(result.errors[1].message).to.include(MSG.KEY_MUST_BE_TYPEID + 'AlsoNotATypeId');
918
+ (0, chai_1.expect)(result.isValid).to.equal(false);
919
+ (0, chai_1.expect)(result.errors.length).to.equal(2);
920
+ (0, chai_1.expect)(result.errors[0].message).to.include(MSG.KEY_MUST_BE_TYPEID + 'NotATypeId');
921
+ (0, chai_1.expect)(result.errors[1].message).to.include(MSG.KEY_MUST_BE_TYPEID + 'AlsoNotATypeId');
922
922
  return result;
923
923
  };
924
924
  return validate(expectations, ConstantMapWithBadKeys, null, true);
@@ -938,7 +938,7 @@ const templateValidator_1 = require("../../templateValidator");
938
938
  throw new Error('This should not be called');
939
939
  };
940
940
  let failExpectations = function (error) {
941
- chai_1.expect(error.toString()).to.include('SV-013: A map with typeids as keys must be constant');
941
+ (0, chai_1.expect)(error.toString()).to.include('SV-013: A map with typeids as keys must be constant');
942
942
  };
943
943
  return performValidation(false, ConstantMapWithProperty, null, true)
944
944
  .then(expectations).catch(failExpectations);
@@ -972,7 +972,7 @@ const templateValidator_1 = require("../../templateValidator");
972
972
  templateValidator.validateAsync(childSchema).then(() => {
973
973
  done(new Error('Should not be valid!'));
974
974
  }, (error) => {
975
- chai_1.expect(error).to.exist;
975
+ (0, chai_1.expect)(error).to.exist;
976
976
  done();
977
977
  });
978
978
  });