diff --git a/test/README.md b/test/README.md index ccd2118302..5ee08b4c6a 100644 --- a/test/README.md +++ b/test/README.md @@ -23,10 +23,6 @@ See [`test/integration/README.md`](./integration/README.md). - **You must not make network requests in test cases.** This rule holds in cases when result isn't used or is expected to fail. You may use `window.useFakeXMLHttpRequest` and `window.server` per the [Sinon API](http://sinonjs.org/docs/#server) to simulate network requests. This ensures that tests are reliable, able to be run in an isolated environment, and performant. - **You should use clear [input space partitioning](http://crystal.uta.edu/~ylei/cse4321/data/isp.pdf) schemes.** Look for edge cases! This ensures that tests suites are comprehensive and easy to understand. -## Browser Tests - -See [`test/browser/README.md`](./browser/README.md). - ## Spies, Stubs, and Mocks The test object is augmented with methods from Sinon.js for [spies](http://sinonjs.org/docs/#spies), [stubs](http://sinonjs.org/docs/#stubs), and [mocks](http://sinonjs.org/docs/#mocks). For example, to use Sinon's spy API, call `t.spy(...)` within a test. diff --git a/test/integration/README.md b/test/integration/README.md index 674448996f..4b5a2b622e 100644 --- a/test/integration/README.md +++ b/test/integration/README.md @@ -1,9 +1,9 @@ -These integration tests verify the correctness and consistency of [mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js) and -[mapbox-gl-native](https://github.com/mapbox/mapbox-gl-native) rendering. +These integration tests verify the correctness and consistency of [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js) and +[maplibre-gl-native](https://github.com/maplibre/maplibre-gl-native) rendering. ## Organization -Tests are contained in a directory tree, generally organized by [style specification](https://github.com/mapbox/mapbox-gl-style-spec) +Tests are contained in a directory tree, generally organized by [style specification](https://maplibre.org/maplibre-gl-js-docs/style-spec/) property: `background-color`, `line-width`, etc., with a second level of directories below that for individual tests. For example, the test for specifying a literal `circle-radius` value lives in [`test/integration/render/tests/circle-radius/literal/`](./render/tests/circle-radius/literal). Within a leaf directory is a `style.json` file (e.g. [`circle-radius/literal/style.json`](./render/tests/circle-radius/literal/style.json)), which contains the minimal style needed for the given test case. The style can specify the map size, center, bearing, and pitch, and additional test metadata (e.g. output image dimensions). @@ -17,27 +17,28 @@ The contents of vector tile fixtures can be read using the [`vt2geojson`](https: ## Running tests -To run the entire integration test suite (both render or query tests), from within the `mapbox-gl-js` directory run the command: -``` -npm run test-suite -``` - -To run only the render/query tests: +To run the render tests: ``` npm run test-render ``` -or + +To run the query tests: ``` npm run test-query ``` -To run only the expression tests: +To run the expression tests: ``` npm run test-expressions ``` +To run the browser tests (see [`browser/README.md`](./browser/README.md)): +``` +npm run test-browser +``` + ### Running specific tests To run a subset of tests or an individual test, you can pass a specific subdirectory to the `test-render` script. For example, to run all the tests for a given property, e.g. `circle-radius`: