Skip to content

Commit

Permalink
fix: remove tests from published bundle
Browse files Browse the repository at this point in the history
* Update all development Yarn dependencies (2020-07-09)

* fix some typos and upgrade dependencies

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: n1ru4l <laurinquast@googlemail.com>
  • Loading branch information
depfu[bot] and n1ru4l committed Aug 6, 2020
1 parent 603bf5f commit 8d3362e
Show file tree
Hide file tree
Showing 4 changed files with 1,618 additions and 2,180 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@
"main": "dist/main/index.js",
"typings": "dist/module/index.d.ts",
"devDependencies": {
"@testing-library/react": "10.0.4",
"@types/jest": "25.2.3",
"@types/react": "16.9.35",
"@typescript-eslint/eslint-plugin": "3.0.0",
"@typescript-eslint/parser": "3.0.0",
"@testing-library/react": "10.4.8",
"@types/jest": "26.0.4",
"@types/react": "16.9.41",
"@typescript-eslint/eslint-plugin": "3.6.0",
"@typescript-eslint/parser": "3.6.0",
"doctoc": "1.4.0",
"eslint": "7.1.0",
"eslint": "7.4.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-jest": "23.13.1",
"eslint-plugin-react": "7.20.0",
"eslint-plugin-jest": "23.18.0",
"eslint-plugin-react": "7.20.3",
"husky": "4.2.5",
"jest": "26.0.1",
"lint-staged": "10.2.6",
"jest": "26.1.0",
"lint-staged": "10.2.11",
"prettier": "2.0.5",
"react": "16.13.1",
"react-dom": "16.13.1",
"rimraf": "3.0.2",
"semantic-release": "17.0.7",
"ts-jest": "26.0.0",
"typescript": "3.9.3"
"semantic-release": "17.1.1",
"ts-jest": "26.1.1",
"typescript": "3.9.6"
},
"peerDependencies": {
"react": "^16.8.6"
Expand Down
8 changes: 4 additions & 4 deletions src/use-async-effect.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ it("does throw promise rejections", async (done) => {
render(<TestComponent />);
});

it("logs error about uncatched promises to the console", async (done) => {
it("logs error about uncaught promises to the console", async (done) => {
const TestComponent: React.FC = () => {
useAsyncEffect(function* () {
yield Promise.reject(new Error("Something went wrong."));
Expand All @@ -229,7 +229,7 @@ it("logs error about uncatched promises to the console", async (done) => {
done();
});

it("onCancel is resetted after each yield", async (done) => {
it("onCancel is reset after each yield", async (done) => {
const callable = jest.fn();
const TestComponent: React.FC = () => {
useAsyncEffect(function* (onCancel) {
Expand Down Expand Up @@ -326,7 +326,7 @@ it("calls a cleanup function returned by the generator when unmounting", async (
done();
});

it("calls a clenup function returned by the generator when dependencies change", async (done) => {
it("calls a cleanup function returned by the generator when dependencies change", async (done) => {
const callable = jest.fn();

let setState: (i: number) => void = () => 1;
Expand Down Expand Up @@ -391,7 +391,7 @@ it("calls latest generator reference upon dependency change", async (done) => {
done();
});

it("interfers the correct type with the typing helper", async (done) => {
it("infers the correct type with the typing helper", async (done) => {
const TestComponent: React.FC = () => {
useAsyncEffect(function* (setErrorHandler, cast) {
const a = yield* cast(
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"skipLibCheck": true,
"downlevelIteration": true,
"lib": ["ESNext", "DOM"]
}
},
"exclude": ["**/*.spec.tsx", "**/*.spec.ts"]
}

0 comments on commit 8d3362e

Please sign in to comment.