@@ -2,29 +2,25 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
22import { spawnSync } from 'child_process' ;
33import { rmSync } from 'fs' ;
44import { join } from 'path' ;
5- import {
6- isCompatiblePlugin ,
7- PullActionPlugin ,
8- PushActionPlugin ,
9- PluginLoader ,
10- } from '../../src/plugin' ;
5+ import { isCompatiblePlugin , PushActionPlugin , PluginLoader } from '../../src/plugin' ;
116
127const testPackagePath = join ( __dirname , '../fixtures' , 'test-package' ) ;
138
14- // Temporarily skipping these until plugin loading is refactored to use ESM/TS
15- describe . skip ( 'loading plugins from packages' , { timeout : 10000 } , ( ) => {
9+ describe ( 'loading plugins from packages' , ( ) => {
1610 beforeAll ( ( ) => {
1711 spawnSync ( 'npm' , [ 'install' ] , { cwd : testPackagePath , timeout : 5000 } ) ;
1812 } ) ;
1913
2014 it (
2115 'should load plugins that are the default export (module.exports = pluginObj)' ,
2216 async ( ) => {
23- const loader = new PluginLoader ( [ join ( testPackagePath , 'default-export.ts ' ) ] ) ;
17+ const loader = new PluginLoader ( [ join ( testPackagePath , 'default-export.js ' ) ] ) ;
2418 await loader . load ( ) ;
2519 expect ( loader . pushPlugins . length ) . toBe ( 1 ) ;
2620 expect ( loader . pushPlugins . every ( ( p ) => isCompatiblePlugin ( p ) ) ) . toBe ( true ) ;
27- expect ( loader . pushPlugins [ 0 ] ) . toBeInstanceOf ( PushActionPlugin ) ;
21+ expect (
22+ loader . pushPlugins . every ( ( p ) => isCompatiblePlugin ( p , 'isGitProxyPushActionPlugin' ) ) ,
23+ ) . toBe ( true ) ;
2824 } ,
2925 { timeout : 10000 } ,
3026 ) ;
@@ -43,8 +39,6 @@ describe.skip('loading plugins from packages', { timeout: 10000 }, () => {
4339 expect (
4440 loader . pullPlugins . every ( ( p ) => isCompatiblePlugin ( p , 'isGitProxyPullActionPlugin' ) ) ,
4541 ) . toBe ( true ) ;
46- expect ( loader . pushPlugins [ 0 ] ) . toBeInstanceOf ( PushActionPlugin ) ;
47- expect ( loader . pullPlugins [ 0 ] ) . toBeInstanceOf ( PullActionPlugin ) ;
4842 } ,
4943 { timeout : 10000 } ,
5044 ) ;
@@ -59,7 +53,6 @@ describe.skip('loading plugins from packages', { timeout: 10000 }, () => {
5953 expect (
6054 loader . pushPlugins . every ( ( p ) => isCompatiblePlugin ( p , 'isGitProxyPushActionPlugin' ) ) ,
6155 ) . toBe ( true ) ;
62- expect ( loader . pushPlugins [ 0 ] ) . toBeInstanceOf ( PushActionPlugin ) ;
6356 } ,
6457 { timeout : 10000 } ,
6558 ) ;
0 commit comments