Skip to content

Commit 82f002c

Browse files
antgonzalesrobdodson
authored andcommitted
Fix advanced AngularJS array and props tests (#211)
1 parent 7e643f8 commit 82f002c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

libraries/angularjs/src/advanced-tests.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,24 @@ describe("advanced support", () => {
1717
);
1818

1919
describe("attributes and properties", () => {
20+
const prep = el => {
21+
return compile(el)(scope)[0];
22+
}
23+
2024
it("will pass array data as a property", function() {
2125
this.weight = 2;
26+
let root = prep("<comp-with-props>")
27+
scope.$digest()
28+
let wc = root.querySelector('#wc')
2229
let data = wc.arr;
23-
expect(data).toEqual(["A", "n", "g", "u", "l", "a", "r"]);
30+
expect(data).toEqual(['A', 'n', 'g', 'u', 'l', 'a', 'r']);
2431
});
2532

2633
it("will pass object data as a property", function() {
2734
this.weight = 2;
35+
let root = prep("<comp-with-props>")
36+
scope.$digest()
37+
let wc = root.querySelector('#wc')
2838
let data = wc.obj;
2939
expect(data).toEqual({ org: "angular", repo: "angular" });
3040
});

0 commit comments

Comments
 (0)