-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: load plugins from project dependencies
- Loading branch information
1 parent
dab4ffc
commit d0ed15e
Showing
6 changed files
with
93 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
test/test-build-job.spec.js → test/specs/job/test-build-job.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
test/test-job-manager.spec.js → test/specs/job/test-job-manager.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { matchesPluginId } from '../../../dist/plugin-api/utils'; | ||
|
||
describe('Plugin API - utils', () => { | ||
describe('matchesPluginId', () => { | ||
it('should match full plugin id', () => { | ||
const match = matchesPluginId( | ||
'appcd-webpack-plugin-babel', | ||
'appcd-webpack-plugin-babel' | ||
); | ||
expect(match).to.be.true; | ||
}); | ||
|
||
it('should match short plugin id', () => { | ||
const match = matchesPluginId( | ||
'appcd-webpack-plugin-babel', | ||
'babel' | ||
); | ||
expect(match).to.be.true; | ||
}); | ||
|
||
it('should match full plugin id with scope', () => { | ||
const match = matchesPluginId( | ||
'@someorg/appcd-webpack-plugin-typescript', | ||
'@someorg/appcd-webpack-plugin-typescript' | ||
); | ||
expect(match).to.be.true; | ||
}); | ||
|
||
it('should match short plugin id with scope', () => { | ||
const match = matchesPluginId( | ||
'@someorg/appcd-webpack-plugin-typescript', | ||
'typescript' | ||
); | ||
expect(match).to.be.true; | ||
}); | ||
|
||
it('should match full plugin id with official scopes', () => { | ||
[ '@appcd', '@titanium-sdk' ].forEach(scope => { | ||
const match = matchesPluginId( | ||
`${scope}/webpack-plugin-babel`, | ||
`${scope}/webpack-plugin-babel` | ||
); | ||
expect(match).to.be.true; | ||
}); | ||
}); | ||
|
||
it('should match short plugin id with official scopes', () => { | ||
[ '@appcd', '@titanium-sdk' ].forEach(scope => { | ||
const match = matchesPluginId( | ||
`${scope}/webpack-plugin-babel`, | ||
'babel' | ||
); | ||
expect(match).to.be.true; | ||
}); | ||
}); | ||
}); | ||
}); |