Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
80818f80
Commit
80818f80
authored
Apr 18, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech(grunt): add check for not including "only" in tests
parent
822bf13b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
public/test/core/utils/emitter_specs.ts
+1
-1
tasks/default_task.js
+14
-1
No files found.
public/test/core/utils/emitter_specs.ts
View file @
80818f80
...
...
@@ -24,7 +24,7 @@ describe("Emitter", () => {
expect
(
sub2Called
).
to
.
be
(
true
);
});
it
.
only
(
'should handle errors'
,
()
=>
{
it
(
'should handle errors'
,
()
=>
{
var
events
=
new
Emitter
();
var
sub1Called
=
0
;
var
sub2Called
=
0
;
...
...
tasks/default_task.js
View file @
80818f80
...
...
@@ -25,6 +25,19 @@ module.exports = function(grunt) {
'typescript:build'
]);
grunt
.
registerTask
(
'test'
,
[
'default'
,
'karma:test'
]);
grunt
.
registerTask
(
'test'
,
[
'default'
,
'karma:test'
,
'no-only-tests'
]);
grunt
.
registerTask
(
'no-only-tests'
,
function
()
{
var
files
=
grunt
.
file
.
expand
(
'public/**/*_specs
\
.ts'
,
'public/**/*_specs
\
.js'
);
files
.
forEach
(
function
(
spec
)
{
var
rows
=
grunt
.
file
.
read
(
spec
).
split
(
'
\
n'
);
rows
.
forEach
(
function
(
row
)
{
if
(
row
.
indexOf
(
'.only('
)
>
0
)
{
grunt
.
log
.
errorlns
(
row
);
grunt
.
fail
.
warn
(
'found only statement in test: '
+
spec
)
}
});
});
});
};
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