Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
d9a643ba
Commit
d9a643ba
authored
Nov 04, 2014
by
Kevin Martensson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run coverage programmatically
parent
8ac7c037
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
27 deletions
+62
-27
.editorconfig
.editorconfig
+0
-3
Makefile
Makefile
+0
-23
package.json
package.json
+2
-1
coverage.js
scripts/coverage.js
+60
-0
No files found.
.editorconfig
View file @
d9a643ba
...
@@ -10,6 +10,3 @@ trim_trailing_whitespace = true
...
@@ -10,6 +10,3 @@ trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
indent_style = space
indent_style = space
indent_size = 2
indent_size = 2
[Makefile]
indent_style = tab
Makefile
deleted
100644 → 0
View file @
8ac7c037
BIN
=
./node_modules/.bin
REPORTER
=
spec
clean
:
@
rm
-rf
lib-cov
test
/fixtures/
*
/build.css
lint
:
@
$(BIN)
/jshint bin lib
test
node_modules
:
package.json
@
npm install
@
touch node_modules
test
:
clean lint node_modules
@
$(BIN)
/_mocha
\
--reporter
$(REPORTER)
test-cov
:
clean lint node_modules
@
$(BIN)
/jscoverage lib lib-cov
@
NODESASS_COV
=
1
$(BIN)
/_mocha
\
--reporter
mocha-lcov-reporter |
$(BIN)
/coveralls
.PHONY
:
test clean
package.json
View file @
d9a643ba
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
},
},
"gypfile"
:
true
,
"gypfile"
:
true
,
"scripts"
:
{
"scripts"
:
{
"coverage"
:
"
make test-cov
"
,
"coverage"
:
"
node scripts/coverage.js
"
,
"install"
:
"node lib/build.js"
,
"install"
:
"node lib/build.js"
,
"prepublish"
:
"node scripts/prepublish"
,
"prepublish"
:
"node scripts/prepublish"
,
"pretest"
:
"node_modules/.bin/jshint bin lib test"
,
"pretest"
:
"node_modules/.bin/jshint bin lib test"
,
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
"bin"
,
"bin"
,
"binding.gyp"
,
"binding.gyp"
,
"lib"
,
"lib"
,
"scripts"
,
"src"
,
"src"
,
"test"
"test"
],
],
...
...
scripts/coverage.js
0 → 100644
View file @
d9a643ba
var
path
=
require
(
'path'
),
spawn
=
require
(
'child_process'
).
spawn
,
bin
=
path
.
join
.
bind
(
null
,
__dirname
,
'..'
,
'node_modules'
,
'.bin'
);
/**
* Run test suite
*
* @api private
*/
function
suite
()
{
process
.
env
.
NODESASS_COV
=
1
;
var
coveralls
=
spawn
(
bin
(
'coveralls'
));
var
mocha
=
spawn
(
bin
(
'_mocha'
),
[
'--reporter'
,
'mocha-lcov-reporter'
],
{
env
:
process
.
env
});
mocha
.
on
(
'error'
,
function
(
err
)
{
console
.
error
(
err
);
process
.
exit
(
1
);
});
mocha
.
stderr
.
setEncoding
(
'utf8'
);
mocha
.
stderr
.
on
(
'data'
,
function
(
err
)
{
console
.
error
(
err
);
process
.
exit
(
1
);
});
mocha
.
stdout
.
pipe
(
coveralls
.
stdin
);
}
/**
* Generate coverage files
*
* @api private
*/
function
coverage
()
{
var
jscoverage
=
spawn
(
bin
(
'jscoverage'
),
[
'lib'
,
'lib-cov'
]);
jscoverage
.
on
(
'error'
,
function
(
err
)
{
console
.
error
(
err
);
process
.
exit
(
1
);
});
jscoverage
.
stderr
.
setEncoding
(
'utf8'
);
jscoverage
.
stderr
.
on
(
'data'
,
function
(
err
)
{
console
.
error
(
err
);
process
.
exit
(
1
);
});
jscoverage
.
on
(
'close'
,
suite
);
}
/**
* Run
*/
coverage
();
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