Skip to content

canjs/can-stache-transform

Repository files navigation

Canjs Stache template transformer for Jestjs

Install

npm install can-stache-transform --save-dev

Jest configuration:

module.exports = {
    testEnvironment: 'jest-environment-jsdom',
    transformIgnorePatterns: [
        "/node_modules/(?!can)"
    ],
    moduleFileExtensions: ["js", "stache"],
    transform: {
        "^.+\\.js$": "babel-jest",
        "^.+\\.mjs$": "babel-jest",
        "^.+\\.stache$": 'can-stache-transform',
    },
}