Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
express-es6-sample
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
William
express-es6-sample
Commits
38c2a999
Commit
38c2a999
authored
Feb 08, 2019
by
Jonathan Cunanan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sample tests
parent
1fe3298f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
4 deletions
+26
-4
.eslintignore
.eslintignore
+5
-0
.eslintrc.js
.eslintrc.js
+1
-1
babel.config.js
babel.config.js
+14
-3
jest.config.js
jest.config.js
+1
-0
index.test.js
src/__tests__/index.test.js
+5
-0
No files found.
.eslintignore
View file @
38c2a999
...
...
@@ -5,6 +5,11 @@ bin
build
dist
# test files
__tests__
*.test.js
*.spec.js
# config files
*.config.js
...
...
.eslintrc.js
View file @
38c2a999
...
...
@@ -15,7 +15,7 @@ module.exports = {
rules
:
{
'
linebreak-style
'
:
[
'
error
'
,
'
unix
'
],
quotes
:
[
'
error
'
,
'
single
'
],
semi
:
[
'
error
'
,
'
always
'
],
semi
:
[
'
warning
'
,
'
always
'
],
'
import/no-commonjs
'
:
'
error
'
}
};
babel.config.js
View file @
38c2a999
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
'
]
};
};
jest.config.js
0 → 100644
View file @
38c2a999
module
.
exports
=
{};
src/__tests__/index.test.js
0 → 100644
View file @
38c2a999
describe
(
'
sample test
'
,
()
=>
{
it
(
'
jest works
'
,
()
=>
{
expect
(
true
).
toBe
(
true
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment