This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
better commonjs test (clean dist, consistent test) #1910
Merged
futuremint
merged 2 commits into
ExactTarget:master
from
swilliamset:improve-test-scripts-to-build-dependencies
Dec 15, 2016
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module.exports = { | ||
commonjs: ['dist/js/npm.js', 'test/commonjs-bundle.js'], | ||
dist: ['dist'], | ||
zipsrc: ['dist/fuelux'], | ||
screenshots: ['page-at-timeout-*.jpg'] | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,15 +1,21 @@ | ||
module.exports = function test (grunt) { | ||
// to be run prior to submitting a PR | ||
grunt.registerTask('test', 'run jshint, qunit source w/ coverage, and validate HTML', | ||
['browserify:commonjs', 'dist', 'jshint', 'connect:testServer', 'qunit:noMoment', 'qunit:globals', 'qunit:dist', 'htmllint', 'resetdist']); | ||
['jshint', 'connect:testServer', 'qunit:noMoment', 'qunit:globals', 'test-dist', 'htmllint']); | ||
|
||
grunt.registerTask('prep-commonjs-test', 'run commonjs config buiild and browserify to prep for commonjs test', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo in description |
||
['commonjs', 'browserify:commonjs']); | ||
|
||
grunt.registerTask('test-dist', 'run jshint, qunit source w/ coverage, and validate HTML', | ||
['dist', 'prep-commonjs-test', 'qunit:dist', 'clean:commonjs']); | ||
|
||
// If qunit:source is working but qunit:full is breaking, check to see if the dist broke the code. This would be especially useful if we start mangling our code, but, is 99.99% unlikely right now | ||
grunt.registerTask('validate-dist', 'run qunit:source, dist, and then qunit:full', | ||
['connect:testServer', 'qunit:source', 'dist', 'browserify:commonjs', 'qunit:dist']); | ||
['connect:testServer', 'qunit:source', 'test-dist']); | ||
|
||
// multiple jQuery versions, then run SauceLabs VMs | ||
grunt.registerTask('releasetest', 'run jshint, build dist, all source tests, validation, and qunit on SauceLabs', | ||
['test', 'dist', 'browserify:commonjs', 'qunit:dist', 'saucelabs-qunit:defaultBrowsers']); | ||
['test', 'saucelabs-qunit:defaultBrowsers']); | ||
|
||
// Due to TravisCI security concerns, Saucelabs can not be run for PRs from forks. Therefore, it can not become part of our PR process. | ||
// https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions | ||
|
@@ -18,7 +24,7 @@ module.exports = function test (grunt) { | |
['connect:testServer', 'jshint', 'saucelabs-qunit:defaultBrowsers']); | ||
|
||
grunt.registerTask('travisci', 'Tests to run when in Travis CI environment', | ||
['browserify:commonjs', 'test', 'dist', 'qunit:dist']); | ||
['test']); | ||
|
||
// if you've already accidentally added your files for commit, this will at least unstage them. If you haven't, this will wipe them out. | ||
grunt.registerTask('resetdist', 'resets changes to dist to keep them from being checked in', function resetdist () { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the commonjs bundle used anywhere else in the dev stuff? Meaning... is it ok that we're removing it from dist completely and only running it during test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no it's not used elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used by CommonJS users of Fuel UX and anyone that pulls in FuelUX via NPM.