File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
test/fixtures/test-package Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ import { PushActionPlugin } from '@finos/git-proxy/plugin' ;
2+
3+ // test default export (ESM syntax)
4+ export default new PushActionPlugin ( async ( req , action ) => {
5+ console . log ( 'Dummy plugin: ' , action ) ;
6+ return action ;
7+ } ) ;
Original file line number Diff line number Diff line change 1+ import { PushActionPlugin , PullActionPlugin } from '@finos/git-proxy/plugin' ;
2+
3+ // test multiple exports (ESM syntax)
4+ export default {
5+ foo : new PushActionPlugin ( async ( req , action ) => {
6+ console . log ( 'PushActionPlugin: ' , action ) ;
7+ return action ;
8+ } ) ,
9+ bar : new PullActionPlugin ( async ( req , action ) => {
10+ console . log ( 'PullActionPlugin: ' , action ) ;
11+ return action ;
12+ } ) ,
13+ } ;
Original file line number Diff line number Diff line change 1+ import { PushActionPlugin } from '@finos/git-proxy/plugin' ;
2+
3+ class DummyPlugin extends PushActionPlugin {
4+ constructor ( exec ) {
5+ super ( ) ;
6+ this . exec = exec ;
7+ }
8+ }
9+
10+ // test default export (ESM syntax)
11+ export default new DummyPlugin ( async ( req , action ) => {
12+ console . log ( 'Dummy plugin: ' , action ) ;
13+ return action ;
14+ } ) ;
You can’t perform that action at this time.
0 commit comments