1.1.0-alpha.0 • Published 2 years ago
jest-kdu-preprocessor v1.1.0-alpha.0
jest-kdu-preprocessor
This package supports both ES6 (Babel) and TypeScript.
Portions both preprocessors are heavily based kduify (Copyright (c) 2021-present NKDuy).
Installation
add package you your project
yarn add --dev jest-kdu-preprocessor
ornpm install --saveDev jest-kdu-preprocessor
modify package.json's jest section by adding/editing moduleFileExtensions and transform properites:
"jest": { "moduleFileExtensions": [ "js", "kdu" ], "transform": { "^.+\\.js$": "<rootDir>/node_modules/babel-jest", ".*\\.(kdu)$": "<rootDir>/node_modules/jest-kdu-preprocessor" } }
Start writing test that can import
*.kdu
components - see example ./tests/index.spec.jsProfit!
License: MIT
1.1.0-alpha.0
2 years ago