test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143)
Previously, only e2e tests were run for docs examples on CI. As a result, unit tests (which are included in the zipped archives we provide for users to download and play with the examples locally) were often outdated and broken. This commit configures specific docs examples that have meaningful unit tests to run them on CI (via the `run-example-e2e.js` script). Where necessary, the unit tests are fixed to ensure they pass and reflect the changes in the corresponding component/service. This commit also removes some auto-generated unit tests that are not meaningful (e.g. make trivial assertions, such that a component instance is truthy) and are often broken anyway (e.g. because the corresponding component has been changed in ways that make the tests fail). PR Close #36143
This commit is contained in:

committed by
Kara Erickson

parent
f4ee067cb8
commit
35ab6acab3
@ -9,6 +9,9 @@ const findFreePort = require('find-free-port');
|
||||
|
||||
shelljs.set('-e');
|
||||
|
||||
// Set `CHROME_BIN` as an environment variable for Karma to pick up in unit tests.
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||
|
||||
const AIO_PATH = path.join(__dirname, '../../');
|
||||
const SHARED_PATH = path.join(__dirname, '/shared');
|
||||
const EXAMPLES_PATH = path.join(AIO_PATH, './content/examples/');
|
||||
|
Reference in New Issue
Block a user