Skip to content

Commit

Permalink
✅ Fixed versions in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wictorwilen committed May 23, 2022
1 parent 49e5203 commit 6c14e79
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion packages/generator-teams/tests/helpers/TestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function coreTests(manifestVersion: string, prompts: any, projectPath: st
assert.jsonFileContent("package.json", { dependencies: { "react": "^16.8.6", "react-dom": "^16.8.6" } });
});
it("Should have correct React typings version", async () => {
assert.jsonFileContent("package.json", { devDependencies: { "@types/react": "16.8.10", "@types/react-dom": "16.8.3" } });
assert.jsonFileContent("package.json", { devDependencies: { "@types/react": "16.8.10", "@types/react-dom": "^16.9.7" } });
});
it("Should have a reference to Fluentui", async () => {
assert.jsonFileContent("package.json", { dependencies: { "@fluentui/react-northstar": {} } });
Expand Down Expand Up @@ -219,6 +219,15 @@ export function coreTests(manifestVersion: string, prompts: any, projectPath: st
it("Should have a coverage script", async () => {
assert.jsonFileContent("package.json", { scripts: { "coverage": "jest --coverage" } });
})
it("Should have correct Enzyme version", async () => {
assert.jsonFileContent("package.json", { devDependencies: { "@types/enzyme": "^3.9.1", "enzyme": "^3.9.0" } });
});
it("Should have correct Jest version", async () => {
assert.jsonFileContent("package.json", { devDependencies: { "@types/jest": "^27.5.0", "jest": "^28.1.0", "ts-jest": "^28.0.2" } });
});
it("Should have correct cheerio version", async () => {
assert.jsonFileContent("package.json", { devDependencies: { "cheerio": "1.0.0-rc.10" } });
});
} else {
it("Should not have unit test files", async () => {
assert.noFile(TEST_FILES);
Expand All @@ -229,6 +238,15 @@ export function coreTests(manifestVersion: string, prompts: any, projectPath: st
it("Should not have a coverage script", async () => {
assert.noJsonFileContent("package.json", { scripts: { "coverage": "jest --coverage" } });
})
it("Should not have Enzyme", async () => {
assert.noJsonFileContent("package.json", { devDependencies: { "@types/enzyme": "^3.9.1", "enzyme": "3.9.0" } });
});
it("Should not have Jest", async () => {
assert.noJsonFileContent("package.json", { devDependencies: { "@types/jest": "^27.5.0", "jest": "^28.1.0", "ts-jest": "^28.0.2" } });
});
it("Should not have cheerio", async () => {
assert.noJsonFileContent("package.json", { devDependencies: { "cheerio": "1.0.0-rc.10" } });
});
}

if (prompts.isFullScreen) {
Expand Down

0 comments on commit 6c14e79

Please sign in to comment.