Skip to content

Commit

Permalink
Fix validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adcreare committed Jan 23, 2025
1 parent a326ba9 commit b2e9cea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/validate-npm-package/validate-npm-package.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ describe('validate-npm-package', () => {
await verifyNpmPackage();
}, 300_000);

// this test should reject but isn't now
// this did work historically
// eslint-disable-next-line jest/no-disabled-tests
it.skip('bad npm package results in error', async () => {
// Test uses a bad version of approval package
// and requires skipLibCheck: false in tsconfig.json
// we set it manually in validate npm package as
// checkdigit/typescript-config is various versions of this setting
it('bad npm package results in error', async () => {
actionsCoreSpy.mockImplementationOnce((name) => {
if (name === 'betaPackage') {
return '@checkdigit/[email protected]';
Expand Down
3 changes: 3 additions & 0 deletions src/validate-npm-package/validate-npm-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ async function generateProject(workFolder: string, packageJson: PackageJson): Pr
// create tsconfig.json
const tsconfigJson = {
extends: '@checkdigit/typescript-config',
compilerOptions: {
skipLibCheck: false,
},
};
await fs.writeFile(`${workFolder}/tsconfig.json`, JSON.stringify(tsconfigJson, null, 2));
}
Expand Down

0 comments on commit b2e9cea

Please sign in to comment.