-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test bundle, Documentation & Codi 🐶 Update #1707
base: patch
Are you sure you want to change the base?
Conversation
@@ -4,13 +4,14 @@ import * as esbuild from 'esbuild' | |||
const isDev = process.env.NODE_ENV !== 'DEVELOPMENT'; | |||
|
|||
const buildOptions = { | |||
entryPoints: ['./lib/mapp.mjs', './lib/ui.mjs'], | |||
entryPoints: isDev ? ['./lib/mapp.mjs', './lib/ui.mjs'] : ['./lib/mapp.mjs', './lib/ui.mjs', './tests/_mapp.test.mjs'], |
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.
We bundle the test assets if we are in DEVELOPMENT mode. We can discuss if we want this all the time or in other certain situations.
@@ -11,7 +11,7 @@ | |||
"scripts": { | |||
"test": "codi tests", | |||
"_build": "node esbuild.config.mjs", | |||
"browser-sync": "npx browser-sync start --proxy localhost:3000 --port 3001 --ui-port 3002 --files public/js/lib/**/* --no-open --no-notify", | |||
"browser-sync": "npx browser-sync start --proxy localhost:3000 --port 3001 --ui-port 3002 --files public/js/**/* --no-open --no-notify", |
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.
Browser sync will now reload for either changes to lib or tests
if (integrity) { | ||
results = await codi.runWebTests(testFiles); | ||
} else { | ||
results = await codi.runWebTestFunction(_mappTest.coreTest); |
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.
This webTestFunction might be better used on each test function in the test bundle to try aid parallel testing in the future.
import { formatTest } from './lib/layer/format/_format.test.mjs'; | ||
import { ui_locations } from './lib/ui/locations/_locations.test.mjs'; | ||
|
||
self._mappTest = { |
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.
This is the test bundle entry point that self assigns just like mapp
@@ -0,0 +1,67 @@ | |||
{ |
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.
Example of saving away a configuration, which can be imported from the bundled test library.
} | ||
} | ||
} | ||
import mvt_layer_default from '../../../assets/layers/mvt/layer.json'; |
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.
Example of importing the asset. This will be applied more as I continue the re-review and structure of current tests
//TODO | ||
}); | ||
}); | ||
// await codi.describe('TODO: Mapview: allfeaturesTest', async () => { |
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.
Keeping these TODO's in the test base so I can get to the asap
@@ -3,67 +3,7 @@ | |||
* @function Tabview | |||
*/ | |||
export async function Tabview() { | |||
|
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.
This need to be re-reviewed
Quality Gate passedIssues Measures |
Description
Implemented a comprehensive test bundle system to enhance test reusability across different environments. This update includes:
Test Bundle Features
Codi 🐶 v0.0.47 Updates
--quiet
flagGitHub Issue
Resolves #1440
Type of Change