Commit 38c2a999 authored by Jonathan Cunanan's avatar Jonathan Cunanan

Add sample tests

parent 1fe3298f
......@@ -5,6 +5,11 @@ bin
build
dist
# test files
__tests__
*.test.js
*.spec.js
# config files
*.config.js
......
......@@ -15,7 +15,7 @@ module.exports = {
rules: {
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
semi: ['warning', 'always'],
'import/no-commonjs': 'error'
}
};
module.exports = {
presets: ['@babel/preset-env'],
ignore: ['**/__tests__/**', '*.test.js', '*.spec.js']
module.exports = api => {
const isTest = api.env('test');
api.cache(true);
// configs to load when testing environment
if (isTest)
return {
presets: ['@babel/preset-env']
};
return {
presets: ['@babel/preset-env'],
ignore: ['**/__tests__/**', '*.test.js', '*.spec.js']
};
};
module.exports = {};
describe('sample test', () => {
it('jest works', () => {
expect(true).toBe(true);
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment