-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(filewriter): disable visitor from calling the file writer
Signed-off-by: Muhammed Abdulkadir <[email protected]>
- Loading branch information
Muhammed Abdulkadir
committed
Sep 20, 2024
1 parent
1023ba9
commit fdcadd3
Showing
4 changed files
with
7 additions
and
17 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 |
---|---|---|
|
@@ -22,7 +22,6 @@ const { | |
const { ModelManager } = require('@accordproject/concerto-core'); | ||
const fs = require('fs'); | ||
const { expect } = require('expect'); | ||
const sinon = require('sinon'); | ||
|
||
const chai = require('chai'); | ||
const { InMemoryWriter } = require('@accordproject/concerto-util'); | ||
|
@@ -32,7 +31,6 @@ chai.use(require('chai-things')); | |
|
||
describe('graph', function() { | ||
let modelManager = null; | ||
let mockFileWriter; | ||
|
||
before(function() { | ||
process.env.ENABLE_MAP_TYPE = 'true'; // TODO Remove on release of MapType | ||
|
@@ -50,7 +48,6 @@ describe('graph', function() { | |
'utf-8' | ||
); | ||
modelManager.addCTOModel(hr, 'hr.cto'); | ||
mockFileWriter = sinon.createStubInstance(InMemoryWriter); | ||
}); | ||
|
||
describe('#visitor', function() { | ||
|
@@ -60,7 +57,7 @@ describe('graph', function() { | |
const writer = new InMemoryWriter(); | ||
|
||
const graph = new DirectedGraph(); | ||
modelManager.accept(visitor, { graph, fileWriter: mockFileWriter }); | ||
modelManager.accept(visitor, { graph }); | ||
|
||
writer.openFile('graph.mmd'); | ||
graph.print(writer); | ||
|
@@ -157,7 +154,7 @@ describe('graph', function() { | |
const writer = new InMemoryWriter(); | ||
|
||
const graph = new DirectedGraph(); | ||
modelManager.accept(visitor, { graph, fileWriter: mockFileWriter }); | ||
modelManager.accept(visitor, { graph }); | ||
|
||
const connectedGraph = graph.findConnectedGraph( | ||
'[email protected]' | ||
|
@@ -261,8 +258,7 @@ describe('graph', function() { | |
const graph = new DirectedGraph(); | ||
modelManager.accept(visitor, { | ||
graph, | ||
createDependencyGraph: true, | ||
fileWriter: mockFileWriter | ||
createDependencyGraph: true | ||
}); | ||
|
||
writer.openFile('graph.mmd'); | ||
|