File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
packages/plugin-eslint/src/lib Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change 11import { pluginConfigSchema } from '@code-pushup/models' ;
22import { eslintPlugin } from './eslint-plugin.js' ;
3-
4- vi . mock ( './meta/index.js' , ( ) => ( {
5- listAuditsAndGroups : vi . fn ( ) . mockResolvedValue ( {
6- audits : [
7- { slug : 'type-safety' , title : 'Type Safety' } ,
8- { slug : 'no-empty' , title : 'Disallow empty block statements' } ,
9- ] ,
10- groups : [ ] ,
11- } ) ,
12- } ) ) ;
3+ import * as metaModule from './meta/index.js' ;
134
145describe ( 'eslintPlugin' , ( ) => {
6+ const listAuditsAndGroupsSpy = vi . spyOn ( metaModule , 'listAuditsAndGroups' ) ;
7+
8+ beforeAll ( ( ) => {
9+ listAuditsAndGroupsSpy . mockResolvedValue ( {
10+ audits : [
11+ { slug : 'type-safety' , title : 'Type Safety' } ,
12+ { slug : 'no-empty' , title : 'Disallow empty block statements' } ,
13+ ] ,
14+ groups : [ ] ,
15+ } ) ;
16+ } ) ;
17+
1518 it ( 'should pass scoreTargets to PluginConfig when provided' , async ( ) => {
1619 const pluginConfig = await eslintPlugin (
1720 {
You can’t perform that action at this time.
0 commit comments