mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Migrate from karma+mocha to jest
This commit is contained in:
22
jest/__mocks__/intlMock.js
Normal file
22
jest/__mocks__/intlMock.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/* eslint-env node */
|
||||
const path = require("path");
|
||||
const { transform } = require("../../webpack-utils/intl-loader");
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* @param {string} src - transformed module source code
|
||||
* @param {string} filename - transformed module file path
|
||||
* @param {{[key: string]: any}} config - jest config
|
||||
* @param {{instrument: boolean}} options - additional options
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
process(src, filename, config, options) {
|
||||
return transform(
|
||||
src,
|
||||
filename,
|
||||
path.resolve(`${__dirname}/../../..`)
|
||||
);
|
||||
}
|
||||
};
|
||||
1
jest/__mocks__/mockStrExport.js
Normal file
1
jest/__mocks__/mockStrExport.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = 'test-file-stub';
|
||||
Reference in New Issue
Block a user