jest-preset-fastly-js-compute
v1.3.0
Published
Jest presets for [JavaScript on Compute@Edge](https://developer.fastly.com/learning/compute/javascript/).
Downloads
4,087
Readme
jest-preset-fastly-js-compute
Jest presets for JavaScript on Compute@Edge.
- Provide Compute@Edge global variables/classes which are defined inside fastly runtime
- Resolve namespaced imports like
fastly:xxx
Requirements
- node.js (prefer version 18.12 or later)
Installation
yarn:
yarn add -D jest-preset-fastly-js-compute
npm:
npm install -D jest-preset-fastly-js-compute
Usage / Example
This package supports TypeScript ESM or CommonJS style.
ESM:
// jest.config.mjs
export default {
...
preset: 'jest-preset-fastly-js-compute/typescript/esm',
}
CommonJS:
// jest.config.js
module.exports = {
...
preset: 'jest-preset-fastly-js-compute/typescript/cjs',
}
Contribution
- Fork this repository
- Customize / Fix problem
- Send PR :-)
- Or feel free to create issues for us. We'll look into it
Author
Yoshiaki Sugimoto [email protected]
License
MIT