File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ npm-debug.log
44.DS_STORE
55. * .swp
66.nyc *
7- .idea /
7+ .idea /
8+ package-lock.json
Original file line number Diff line number Diff line change @@ -256,6 +256,20 @@ class Executor {
256256 async _unzipArtifacts ( ) {
257257 throw new Error ( 'Not implemented' ) ;
258258 }
259+
260+ /**
261+ * Enqueue webhookConfig to queue service
262+ * @method enqueueWebhook
263+ * @param {Object } config Configuration
264+ * @return {Promise }
265+ */
266+ enqueueWebhook ( config ) {
267+ return this . _enqueueWebhook ( config ) ;
268+ }
269+
270+ async _enqueueWebhook ( ) {
271+ throw new Error ( 'Not implemented' ) ;
272+ }
259273}
260274
261275module . exports = Executor ;
Original file line number Diff line number Diff line change @@ -240,6 +240,17 @@ describe('index test', () => {
240240 }
241241 ) ) ;
242242
243+ it ( 'enqueueWebhook returns an error when not overridden' , ( ) =>
244+ instance . enqueueWebhook ( { } ) . then (
245+ ( ) => {
246+ throw new Error ( 'Oh no' ) ;
247+ } ,
248+ err => {
249+ assert . isOk ( err , 'error is null' ) ;
250+ assert . equal ( err . message , 'Not implemented' ) ;
251+ }
252+ ) ) ;
253+
243254 it ( 'can be extended' , ( ) => {
244255 class Foo extends Executor {
245256 _stop ( config ) {
You can’t perform that action at this time.
0 commit comments