-
-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix SSR inferno-animation (#1578)
* Fix bug in server-side rendering * The server-side rendering test of StaticRouter shouldn't depend om DOM * Add SSR test without DOM * Added test of transitionEnd with jsdom * Include tests without jsdom for SSR * Run StaticRouter SSR-test without DOM * Delete package-lock.json Co-authored-by: Sampo Kivistö <sampo.kivisto@live.fi>
- Loading branch information
Showing
6 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module.exports = { | ||
collectCoverageFrom: [ | ||
"packages/*/src/**/*.ts", | ||
"!**/*.ts.js", | ||
"!**/inferno-utils/**/*", | ||
"!**/inferno-router/**/utils.ts", | ||
], | ||
coverageDirectory: "coverage", | ||
coverageReporters: ["html", "lcov", "text"], | ||
globals: { | ||
usingJSDOM: true, | ||
usingJest: true | ||
}, | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx"], | ||
moduleNameMapper: { | ||
"^inferno-router/utils": "<rootDir>/packages/inferno-router/src/utils", | ||
"^inferno(.*?)$": "<rootDir>/packages/inferno$1/src/index.ts", | ||
"mobx": "<rootDir>/node_modules/mobx" | ||
}, | ||
rootDir: __dirname, | ||
setupFiles: [], | ||
testMatch: [ | ||
"<rootDir>/packages/*/__tests__/**/*spec.server-nodom.@(js|ts)?(x)" | ||
], | ||
testPathIgnorePatterns: [ | ||
"<rootDir>/packages/inferno/__tests__/transition.spec.jsx", | ||
], | ||
transform: { | ||
"^.+\\.jsx?$": "<rootDir>/jest.babel.transform.js", | ||
"^.+\\.tsx?$": "<rootDir>/jest.ts.transform.js" | ||
}, | ||
testEnvironment: "node", | ||
testRunner: "jest-jasmine2", | ||
reporters: [["jest-silent-reporter", { "useDots": true }]] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/inferno-animation/__tests__/utils.spec.server-nodom.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { | ||
transitionEndName | ||
} from '../src/utils'; | ||
|
||
describe('inferno-animation utils SSR', () => { | ||
it('transitionEnd is empty string', () => { | ||
expect(transitionEndName).toEqual(''); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters