angular-cn/modules/test_lib/test/test_lib_spec.js
Tobias Bosch 7a70f8f92d feat(compiler): initial version of the compiler.
Supports:
- binds text nodes, element properties and directive properties
- locates decorator, component and template directives.
- inline templates of components

The compiler is built using a pipeline design,
see core/src/compiler/pipeline package.

Integration tests to show how the compiler, change_detection and DI work
together:
core/test/compiler/integration_spec.js
2014-11-11 17:55:50 -08:00

26 lines
722 B
JavaScript

import {describe, it, iit, expect} from 'test_lib/test_lib';
class TestObj {
constructor(prop) {
this.prop = prop;
}
}
export function main() {
describe("test_lib", function () {
describe("equality", function () {
it("should structurally compare objects", function () {
var expected = new TestObj(new TestObj({"one" : [1,2]}));
var actual = new TestObj(new TestObj({"one" : [1,2]}));
var falseActual = new TestObj(new TestObj({"one" : [1,3]}));
expect(actual).toEqual(expected);
expect(falseActual).not.toEqual(expected);
});
it('should work for arrays of maps', () => {
expect([{'a':'b'}]).toEqual([{'a':'b'}]);
});
});
});
}