-
Notifications
You must be signed in to change notification settings - Fork 8
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
203 changed files
with
3,666 additions
and
1,160 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 |
---|---|---|
|
@@ -10,4 +10,4 @@ gulp | |
.babelrc | ||
.gitignore | ||
gulpfile.babel.js | ||
|
||
unit-tests |
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,10 @@ | ||
import fs from 'fs'; | ||
|
||
export default function readFile(fileName){ | ||
return new Promise((resolve, reject) => { | ||
fs.readFile(fileName, 'utf8', (err, contents)=>{ | ||
if (err) throw new Error(err); | ||
resolve(contents); | ||
}) | ||
}) | ||
} |
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,11 @@ | ||
import readFile from './readFile'; | ||
|
||
export default function unitTest (fileName, dir, expectedResult){ | ||
test(fileName, ()=>{ | ||
return readFile(`${dir}/${fileName}.css`).then(css => { | ||
expect( css ).toBe(expectedResult+'\n'); | ||
}) | ||
}) | ||
} | ||
|
||
//__dirname |
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,22 @@ | ||
|
||
import notifier from 'node-notifier'; | ||
import { notification_icon_location } from '../config/shared-vars'; | ||
|
||
export default function(gulp, plugins, args, config, taskTarget, browserSync) { | ||
|
||
// Sass compilation | ||
gulp.task('compile-tests', () => { | ||
return gulp.src('unit-tests/*/**/*.scss') | ||
.pipe(plugins.wait(100))//Helps prevent odd file not found error | ||
.pipe(plugins.sass({ | ||
outputStyle: 'compressed', | ||
precision: 10, | ||
includePaths: [ | ||
'unit-tests', | ||
'node_modules' | ||
] | ||
}).on('error', plugins.sass.logError)) | ||
.pipe(gulp.dest('unit-tests')) | ||
}); | ||
|
||
} |
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
Oops, something went wrong.