Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/keplersj/jest-raw-loader

Jest transformer mimicking webpack-contrib/raw-loader's functionality
https://github.com/keplersj/jest-raw-loader

jest unit-testing webpack-contrib

Last synced: about 1 month ago
JSON representation

Jest transformer mimicking webpack-contrib/raw-loader's functionality

Awesome Lists containing this project

README

        

# jest-raw-loader

[Jest](https://facebook.github.io/jest/) transformer mimicking [webpack-contrib/raw-loader](https://github.com/webpack-contrib/raw-loader)'s functionality

## Install

```
$ npm install --save-dev jest-raw-loader
```

## Usage

Use [jest's `transform` configuration options](https://facebook.github.io/jest/docs/en/configuration.html#transform-object-string-string) to use this package in your unit tests.

For example use the following to raw load `.md` and `.graphql` files:

```json
"jest": {
"transform": {
"\\.graphql$": "jest-raw-loader",
"\\.md$": "jest-raw-loader"
}
}
```

## License

Copyright 2017-2020 [Kepler Sticka-Jones](https://keplersj.com/). Licensed MIT.