mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Rename "js/tests/units" to "js/tests/unit". (#29503)
This commit is contained in:
parent
1770691b33
commit
577bf8b14d
20 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
## How does Bootstrap's test suite work?
|
## How does Bootstrap's test suite work?
|
||||||
|
|
||||||
Bootstrap uses [Jasmine](https://jasmine.github.io/). Each plugin has a file dedicated to its tests in `tests/units/<plugin-name>.spec.js`.
|
Bootstrap uses [Jasmine](https://jasmine.github.io/). Each plugin has a file dedicated to its tests in `tests/unit/<plugin-name>.spec.js`.
|
||||||
|
|
||||||
* `visual/` contains "visual" tests which are run interactively in real browsers and require manual verification by humans.
|
* `visual/` contains "visual" tests which are run interactively in real browsers and require manual verification by humans.
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ To run the unit test suite via [Karma](https://karma-runner.github.io/) and debu
|
||||||
|
|
||||||
## How do I add a new unit test?
|
## How do I add a new unit test?
|
||||||
|
|
||||||
1. Locate and open the file dedicated to the plugin which you need to add tests to (`tests/units/<plugin-name>.spec.js`).
|
1. Locate and open the file dedicated to the plugin which you need to add tests to (`tests/unit/<plugin-name>.spec.js`).
|
||||||
2. Review the [Jasmine API Documentation](https://jasmine.github.io/pages/docs_home.html) and use the existing tests as references for how to structure your new tests.
|
2. Review the [Jasmine API Documentation](https://jasmine.github.io/pages/docs_home.html) and use the existing tests as references for how to structure your new tests.
|
||||||
3. Write the necessary unit test(s) for the new or revised functionality.
|
3. Write the necessary unit test(s) for the new or revised functionality.
|
||||||
4. Run `npm run js-test` to see the results of your newly-added test(s).
|
4. Run `npm run js-test` to see the results of your newly-added test(s).
|
||||||
|
|
|
@ -58,15 +58,15 @@ const conf = {
|
||||||
},
|
},
|
||||||
files: [
|
files: [
|
||||||
'node_modules/hammer-simulator/index.js',
|
'node_modules/hammer-simulator/index.js',
|
||||||
{ pattern: 'js/tests/units/**/*.spec.js', watched: !browserStack }
|
{ pattern: 'js/tests/unit/**/*.spec.js', watched: !browserStack }
|
||||||
],
|
],
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'js/tests/units/**/*.spec.js': ['rollup']
|
'js/tests/unit/**/*.spec.js': ['rollup']
|
||||||
},
|
},
|
||||||
rollupPreprocessor: {
|
rollupPreprocessor: {
|
||||||
plugins: [
|
plugins: [
|
||||||
istanbul({
|
istanbul({
|
||||||
exclude: ['js/tests/units/**/*.spec.js', 'js/tests/helpers/**/*.js']
|
exclude: ['js/tests/unit/**/*.spec.js', 'js/tests/helpers/**/*.js']
|
||||||
}),
|
}),
|
||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
|
|
Loading…
Add table
Reference in a new issue