Skip to content

Commit

Permalink
Update approval controller test import (#339)
Browse files Browse the repository at this point in the history
The approval controller tests were importing the _built_ version of the
approval controller, rather than the original source. This resulted in
odd coverage stats, and necessitated ignoring `dist/BaseController*`.

By updating the import to use the source directly, the coverage stats
look fine without ignoring anything.
  • Loading branch information
Gudahtt authored and MajorLift committed Oct 11, 2023
1 parent c4996b2 commit 992490f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"dist/BaseController*",
"tests/"
],
"coverageThreshold": {
Expand Down
2 changes: 1 addition & 1 deletion tests/ApprovalController.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { errorCodes } = require('eth-rpc-errors');
const ApprovalController = require('../dist/approval/ApprovalController').default;
const ApprovalController = require('../src/approval/ApprovalController').default;

const defaultConfig = {
showApprovalRequest: () => undefined,
Expand Down
2 changes: 1 addition & 1 deletion tests/ApprovalController.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { errorCodes } from 'eth-rpc-errors';
import ApprovalController from '../dist/approval/ApprovalController';
import ApprovalController from '../src/approval/ApprovalController';

const sinon = require('sinon');

Expand Down

0 comments on commit 992490f

Please sign in to comment.