mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 07:10:05 +02:00
Adding test hook to allow requiring of fonts
This commit is contained in:
parent
4953ae36ea
commit
348b24a31d
@ -3,6 +3,11 @@ const jsdom = require('jsdom');
|
|||||||
const register = require('babel-register');
|
const register = require('babel-register');
|
||||||
|
|
||||||
hook.hook('.png', () => '');
|
hook.hook('.png', () => '');
|
||||||
|
hook.hook('.eot', () => '');
|
||||||
|
hook.hook('.woff', () => '');
|
||||||
|
hook.hook('.woff2', () => '');
|
||||||
|
hook.hook('.ttf', () => '');
|
||||||
|
hook.hook('.svg', () => '');
|
||||||
|
|
||||||
register({
|
register({
|
||||||
extensions: ['.js']
|
extensions: ['.js']
|
||||||
|
@ -63,6 +63,12 @@ module.exports = {
|
|||||||
exclude: [/node_modules/g],
|
exclude: [/node_modules/g],
|
||||||
include: INCLUDE,
|
include: INCLUDE,
|
||||||
loader: 'raw-loader!embed-markdown-loader'
|
loader: 'raw-loader!embed-markdown-loader'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(eot|svg|ttf|woff|woff2)$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
loader: 'file-loader',
|
||||||
|
include: INCLUDE
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
"eslint-plugin-standard": "^2.0.1",
|
"eslint-plugin-standard": "^2.0.1",
|
||||||
"jsdom": "^9.9.1",
|
"jsdom": "^9.9.1",
|
||||||
"memory-fs": "^0.4.1",
|
"memory-fs": "^0.4.1",
|
||||||
|
"node-hook": "^0.4.0",
|
||||||
"nyc": "^10.0.0",
|
"nyc": "^10.0.0",
|
||||||
"pre-commit": "^1.2.2",
|
"pre-commit": "^1.2.2",
|
||||||
"react-addons-test-utils": "^15.4.1",
|
"react-addons-test-utils": "^15.4.1",
|
||||||
@ -68,7 +69,8 @@
|
|||||||
"failFast": true,
|
"failFast": true,
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"require": [
|
"require": [
|
||||||
"babel-register"
|
"babel-register",
|
||||||
|
"./test/_hook.js"
|
||||||
],
|
],
|
||||||
"babel": "inherit"
|
"babel": "inherit"
|
||||||
},
|
},
|
||||||
|
7
ui/test/_hook.js
Normal file
7
ui/test/_hook.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
const hook = require('node-hook');
|
||||||
|
|
||||||
|
hook.hook('.eot', () => '');
|
||||||
|
hook.hook('.woff', () => '');
|
||||||
|
hook.hook('.woff2', () => '');
|
||||||
|
hook.hook('.ttf', () => '');
|
||||||
|
hook.hook('.svg', () => '');
|
@ -4407,6 +4407,10 @@ node-fetch@^1.0.1:
|
|||||||
encoding "^0.1.11"
|
encoding "^0.1.11"
|
||||||
is-stream "^1.0.1"
|
is-stream "^1.0.1"
|
||||||
|
|
||||||
|
node-hook@^0.4.0:
|
||||||
|
version "0.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-hook/-/node-hook-0.4.0.tgz#782a3b3b4873388f93d087cd2971162f24eb6f2d"
|
||||||
|
|
||||||
node-libs-browser@^0.7.0:
|
node-libs-browser@^0.7.0:
|
||||||
version "0.7.0"
|
version "0.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.7.0.tgz#3e272c0819e308935e26674408d7af0e1491b83b"
|
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.7.0.tgz#3e272c0819e308935e26674408d7af0e1491b83b"
|
||||||
|
Loading…
Reference in New Issue
Block a user