mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-11 13:14:28 +00:00
flow: add typing to Jest transform modules (#790)
Test Plan: `yarn flow` passes, and the [Jest docs][1] suggest that the added type annotations are correct. [1]: https://jestjs.io/docs/en/configuration#transform-object-string-string wchargin-branch: flow-jest-transforms
This commit is contained in:
parent
92514ad559
commit
0b4fea1c4f
@ -1,4 +1,4 @@
|
||||
// @no-flow
|
||||
// @flow
|
||||
// This is a custom Jest transformer turning style imports into empty objects.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
// @no-flow
|
||||
// @flow
|
||||
const path = require("path");
|
||||
|
||||
// This is a custom Jest transformer turning file imports into filenames.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process(src, filename) {
|
||||
process(src /*: string */, filename /*: string */) {
|
||||
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user