-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
242 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ node_js: | |
- "stable" | ||
- "5.0" | ||
- "4.0" | ||
- "0.12" | ||
- "0.10" | ||
after_script: | ||
- npm run coveralls | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
'use strict'; | ||
|
||
var fs = require('fs'); | ||
var resolve = require('path').resolve; | ||
var exec = require('child_process').exec; | ||
var expect = require('chai').use(require('sinon-chai')).expect; | ||
var gulp = require('gulp'); | ||
var rimraf = require('rimraf'); | ||
var paths = require('./fixtures/paths'); | ||
|
||
|
||
|
||
describe('readme:examples', function() { | ||
|
||
describe('example:simple', function() { | ||
|
||
before(function(done) { | ||
require('./fixtures/tasks/quadruple'); | ||
gulp.start('quadruple', done); | ||
}); | ||
|
||
it('repeats contents four times and joins with newline', function() { | ||
var expected = fs.readFileSync(resolve(paths.EXP, 'caesar.txt'), 'utf8'); | ||
var contents = fs.readFileSync(resolve(paths.DEST, 'caesar.txt'), 'utf8'); | ||
expect(contents).to.equal(expected); | ||
}); | ||
}); | ||
|
||
describe('example:cheerio', function() { | ||
|
||
before(function(done) { | ||
require('./fixtures/tasks/cheerio'); | ||
gulp.start('cheerio', done); | ||
}); | ||
|
||
it('adds role="main" to <main> tag', function() { | ||
var expected = fs.readFileSync(resolve(paths.EXP, 'index.html'), 'utf8'); | ||
var contents = fs.readFileSync(resolve(paths.DEST, 'index.html'), 'utf8'); | ||
expect(contents).to.equal(expected); | ||
}); | ||
}); | ||
|
||
after(function(done) { | ||
rimraf(paths.DEST, done); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
I am constant as the northern star... | ||
I am constant as the northern star... | ||
I am constant as the northern star... | ||
I am constant as the northern star... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Example HTML</title> | ||
</head> | ||
<body> | ||
<main role="main"> | ||
<h1>Primary content</h1> | ||
</main> | ||
</body> | ||
</html> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
var resolve = require('path').resolve; | ||
|
||
|
||
exports.SRC = resolve(__dirname, 'src'); | ||
exports.DEST = resolve(__dirname, 'dest'); | ||
exports.EXP = resolve(__dirname, 'expected'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
I am constant as the northern star... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Example HTML</title> | ||
</head> | ||
<body> | ||
<main> | ||
<h1>Primary content</h1> | ||
</main> | ||
</body> | ||
</html> |
Oops, something went wrong.