Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
waterdataui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Water Mission Area
Internet of Water
waterdataui
Commits
3ce314b8
Unverified
Commit
3ce314b8
authored
7 years ago
by
Bucknell, Mary S.
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #106 from mbucknell/debug_test_mode
Debug test mode
parents
be4e1cde
4e3d4eb0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
karma.conf.js
+36
-8
36 additions, 8 deletions
karma.conf.js
package.json
+1
-1
1 addition, 1 deletion
package.json
with
37 additions
and
9 deletions
karma.conf.js
+
36
−
8
View file @
3ce314b8
...
...
@@ -3,6 +3,12 @@
var
proxyquire
=
require
(
'
proxyquireify
'
);
var
browserifyBabalIstanbul
=
require
(
'
browserify-babel-istanbul
'
);
var
isparta
=
require
(
'
isparta
'
);
function
isDebug
(
argument
)
{
return
argument
===
'
--debug
'
;
}
module
.
exports
=
function
(
config
)
{
config
.
set
({
...
...
@@ -37,14 +43,7 @@ module.exports = function (config) {
bundle
.
plugin
(
proxyquire
.
plugin
)
.
require
(
require
.
resolve
(
'
./assets/src/scripts
'
),
{
entry
:
true
});
},
transform
:
[
browserifyBabalIstanbul
({
instrumenter
:
isparta
,
instrumenterConfig
:
{
babel
:
{
presets
:
[
'
env
'
]
}
},
ignore
:
[
'
**/node_modules/**
'
,
'
**/unitest/**
'
]
})
]
}
},
// test results reporter to use
...
...
@@ -90,4 +89,33 @@ module.exports = function (config) {
// how many browser should be started simultaneous
concurrency
:
Infinity
});
if
(
process
.
argv
.
some
(
isDebug
))
{
config
.
set
({
browserify
:
{
debug
:
true
,
configure
:
function
(
bundle
)
{
bundle
.
plugin
(
proxyquire
.
plugin
)
.
require
(
require
.
resolve
(
'
./assets/src/scripts
'
),
{
entry
:
true
});
}
}
});
}
else
{
config
.
set
({
browserify
:
{
configure
:
function
(
bundle
)
{
bundle
.
plugin
(
proxyquire
.
plugin
)
.
require
(
require
.
resolve
(
'
./assets/src/scripts
'
),
{
entry
:
true
});
},
transform
:
[
browserifyBabalIstanbul
({
instrumenter
:
isparta
,
instrumenterConfig
:
{
babel
:
{
presets
:
[
'
env
'
]}},
ignore
:
[
'
**/lib/**
'
,
'
**/*.spec.js
'
]
})]
}
});
}
};
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
3ce314b8
...
...
@@ -7,7 +7,7 @@
"test"
:
"karma start"
,
"test:chrome"
:
"karma start --browsers Chrome"
,
"test:firefox"
:
"karma start --browsers Firefox"
,
"test:watch"
:
"karma start --no-single-run --auto-watch --browsers Chrome"
,
"test:watch"
:
"karma start
--debug
--no-single-run --auto-watch --browsers Chrome"
,
"clean"
:
"rm -rf assets/dist && mkdir assets/dist"
,
"build"
:
"npm run clean && run-p build:*"
,
"build:css"
:
"node-sass --include-path node_modules/leaflet/dist --include-path node_modules/uswds/src/stylesheets assets/src/styles/main.scss | uglifycss > assets/dist/main.css"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment