Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure lint returns error on failure #1014

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "fedx-scripts webpack",
"build:with-theme": "THEME=npm:@edx/brand-edx.org@latest npm run install-theme && fedx-scripts webpack",
"check-types": "tsc --noemit",
"lint": "fedx-scripts eslint --ext .js --ext .jsx .; npm run check-types",
"lint": "fedx-scripts eslint --ext .js --ext .jsx . && npm run check-types",
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx --ext .tsx --ext .ts .",
"precommit": "npm run lint",
"prepublishOnly": "npm run build",
Expand Down
12 changes: 6 additions & 6 deletions src/components/Coupon/Coupon.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,29 @@ describe('<Coupon />', () => {
expect(coupon).toMatchSnapshot();
});

it("without max uses", () => {
it('without max uses', () => {
const coupon = renderer
.create(
<CouponWrapper
data={{
...initialCouponData,
max_uses: null,
}}
/>
/>,
)
.toJSON();
expect(coupon).toMatchSnapshot();
});

it("with error state", () => {
it('with error state', () => {
const coupon = renderer
.create(
<CouponWrapper
data={{
...initialCouponData,
errors: [{ code: "test-code", user_email: "[email protected]" }],
errors: [{ code: 'test-code', user_email: '[email protected]' }],
}}
/>
/>,
)
.toJSON();
expect(coupon).toMatchSnapshot();
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('<Coupon />', () => {
<CouponWrapper
onExpand={mockOnExpandOrOnCollapse}
onCollapse={mockOnExpandOrOnCollapse}
/>
/>,
);

fireEvent.keyDown(screen.getByRole('button'), { key: 'A', code: 'KeyA' });
Expand Down