Skip to content

Commit

Permalink
chore: use real paragon version in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz committed May 20, 2023
1 parent 6955d26 commit bfdbb68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config/jest/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ const fs = require('fs');
const dotenv = require('dotenv');
require('babel-polyfill');

const getParagonVersion = require('../data/getParagonVersion');

const testEnvFile = path.resolve(process.cwd(), '.env.test');

if (fs.existsSync(testEnvFile)) {
dotenv.config({ path: testEnvFile });
}

global.PARAGON_VERSION = JSON.stringify('1.0.0');
global.PARAGON_VERSION = JSON.stringify(getParagonVersion(process.cwd()));
2 changes: 1 addition & 1 deletion example/src/__snapshots__/App.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ exports[`Basic test should render 1`] = `
Exposed Paragon version
</h2>
<p>
"\\"1.0.0\\""
"\\"20.39.1\\""
</p>
</div>
`;

0 comments on commit bfdbb68

Please sign in to comment.