mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
feat: basic test coverage
This commit is contained in:
13
packages/app/.babelrc.js
Normal file
13
packages/app/.babelrc.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const plugins = [];
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log(
|
||||
'Detected development environment. Instrumenting code for coverage.'
|
||||
);
|
||||
plugins.push('istanbul');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
presets: ['next/babel'],
|
||||
plugins,
|
||||
};
|
||||
@@ -55,7 +55,7 @@ test.describe.serial('workspace meta collection observable', () => {
|
||||
workspaceUnitCollection.once(
|
||||
'change',
|
||||
(event: WorkspaceUnitCollectionChangeEvent) => {
|
||||
expect(event.deleted?.id).toEqual('123');
|
||||
expect(event.deleted?.[0]?.id).toEqual('123');
|
||||
}
|
||||
);
|
||||
scope.remove('123');
|
||||
|
||||
Reference in New Issue
Block a user