Skip to content

Commit 327f9aa

Browse files
committed
fix: sync tests to match FEM video
1 parent 9fa4e83 commit 327f9aa

File tree

4 files changed

+31
-32
lines changed

4 files changed

+31
-32
lines changed

challenges/advanced-types/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"build": "tsc",
1818
"test": "dtslint test"
1919
},
20-
"devDependencies": {}
20+
"devDependencies": {
21+
"@types/node": "^11.11.3"
22+
}
2123
}

challenges/advanced-types/test/tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"strictNullChecks": true,
88
"strictFunctionTypes": true,
99
"noEmit": true,
10-
"types": [],
11-
1210
// If the library is an external module (uses `export`), this allows your test file to import "mylib" instead of "./index".
1311
// If the library is global (cannot be imported via `import` or `require`), leave this out.
1412
"baseUrl": "..",

challenges/dict/test/dict.test.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ describe("Dict type", () => {
2929
ghi: ["jkl", "mno"]
3030
};
3131
});
32-
it("(compile) should have a default typeParam", () => {
33-
const x: Dict = {
34-
abc: ["def"],
35-
ghi: ["jkl", "mno"]
36-
};
37-
});
38-
it("(compile) should have a default typeParam of `any`", () => {
39-
const x: Dict = {
40-
abc: "def",
41-
ghi: ["jkl", "mno"],
42-
pqr: 4,
43-
stu: () => false
44-
};
45-
});
32+
// it("(compile) should have a default typeParam", () => {
33+
// const x: Dict = {
34+
// abc: ["def"],
35+
// ghi: ["jkl", "mno"]
36+
// };
37+
// });
38+
// it("(compile) should have a default typeParam of `any`", () => {
39+
// const x: Dict = {
40+
// abc: "def",
41+
// ghi: ["jkl", "mno"],
42+
// pqr: 4,
43+
// stu: () => false
44+
// };
45+
// });
4646
});
4747

4848
describe("mapDict", () => {
@@ -85,18 +85,18 @@ describe("reduceDict", () => {
8585
)
8686
).to.eq(26);
8787
});
88-
it("should not invoke the reducer function for undefined values", () => {
89-
let invokeCount = 0;
90-
expect(
91-
indexExports.reduceDict(
92-
{ abc: 4, def: undefined },
93-
(x, acc) => {
94-
invokeCount++;
95-
return `${acc}, ${x}`;
96-
},
97-
""
98-
)
99-
).to.eq(", 4");
100-
expect(invokeCount).to.eq(1);
101-
});
88+
// it("should not invoke the reducer function for undefined values", () => {
89+
// let invokeCount = 0;
90+
// expect(
91+
// indexExports.reduceDict(
92+
// { abc: 4, def: undefined },
93+
// (x, acc) => {
94+
// invokeCount++;
95+
// return `${acc}, ${x}`;
96+
// },
97+
// ""
98+
// )
99+
// ).to.eq(", 4");
100+
// expect(invokeCount).to.eq(1);
101+
// });
102102
});

challenges/json-types/test/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"strictNullChecks": true,
88
"strictFunctionTypes": true,
99
"noEmit": true,
10-
"types": [],
1110

1211
// If the library is an external module (uses `export`), this allows your test file to import "mylib" instead of "./index".
1312
// If the library is global (cannot be imported via `import` or `require`), leave this out.

0 commit comments

Comments
 (0)