-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(node): Allow metaConfig to be passed to nodes in WF chain
Instead of mixing meta config with regular config, just have them passed in as separate parameters closes #26
- Loading branch information
1 parent
da4b875
commit c9a6bd9
Showing
5 changed files
with
46 additions
and
19 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
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,20 @@ | ||
'use strict'; | ||
|
||
import {gustav} from '../index'; | ||
import {expect} from 'chai'; | ||
import {addCommonNodes} from './testNodes'; | ||
|
||
addCommonNodes(gustav); | ||
|
||
describe('Adding a custom id to a node', () => { | ||
it('should allow the user to add a custom id', () => { | ||
let wf = gustav.createWorkflow('gid test') | ||
.source('intSource', null, {gid: 'hello'}) | ||
.sink('fromIntSource', () => {}, {gid: 'bye'}); | ||
|
||
|
||
// Simple way to get the nodes themselves | ||
expect(wf.ggraph.sinkEdges[0].to.toString()).to.equal('Symbol(intSource-hello)'); | ||
expect(wf.ggraph.sinkEdges[0].from.toString()).to.equal('Symbol(fromIntSource-bye)'); | ||
}); | ||
}); |
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