Skip to content

Commit

Permalink
fix tests after rename the fileNames fields
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomontero committed Dec 18, 2023
1 parent 988e06b commit da1cc9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cmd/logic-function.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('LogicFunctionCommands', () => {
id: '0021e8f4-64ee-416d-83f3-898aa909fb1b',
});
lf.fileNames = {
source: 'code.js',
sourceCode: 'code.js',
configuration: 'config.json'
};
});
Expand All @@ -120,7 +120,7 @@ describe('LogicFunctionCommands', () => {
expect(lf.saveToDisk.calledOnce).to.be.true;
expect(logicFunctionCommands.ui.stdout.write.callCount).to.equal(6);
expect(logicFunctionCommands.ui.stdout.write.getCall(2).args[0]).to.equal(` - ${lf.fileNames.configuration}${os.EOL}`);
expect(logicFunctionCommands.ui.stdout.write.getCall(3).args[0]).to.equal(` - ${lf.fileNames.source}${os.EOL}`);
expect(logicFunctionCommands.ui.stdout.write.getCall(3).args[0]).to.equal(` - ${lf.fileNames.sourceCode}${os.EOL}`);
});
it('gets a logic function with an specific id from Sandbox account', async () => {
const logicGetStub = sinon.stub(LogicFunction, 'getByIdOrName').resolves(lf);
Expand All @@ -132,7 +132,7 @@ describe('LogicFunctionCommands', () => {
expect(lf.saveToDisk.calledOnce).to.be.true;
expect(logicFunctionCommands.ui.stdout.write.callCount).to.equal(6);
expect(logicFunctionCommands.ui.stdout.write.getCall(2).args[0]).to.equal(` - ${lf.fileNames.configuration}${os.EOL}`);
expect(logicFunctionCommands.ui.stdout.write.getCall(3).args[0]).to.equal(` - ${lf.fileNames.source}${os.EOL}`);
expect(logicFunctionCommands.ui.stdout.write.getCall(3).args[0]).to.equal(` - ${lf.fileNames.sourceCode}${os.EOL}`);

});
it('shows error if logic function is not found', async () => {
Expand Down Expand Up @@ -160,7 +160,7 @@ describe('LogicFunctionCommands', () => {
expect(lf.saveToDisk.calledOnce).to.be.true;
expect(logicFunctionCommands.ui.stdout.write.callCount).to.equal(6);
expect(logicFunctionCommands.ui.stdout.write.getCall(2).args[0]).to.equal(` - ${lf.fileNames.configuration}${os.EOL}`);
expect(logicFunctionCommands.ui.stdout.write.getCall(3).args[0]).to.equal(` - ${lf.fileNames.source}${os.EOL}`);
expect(logicFunctionCommands.ui.stdout.write.getCall(3).args[0]).to.equal(` - ${lf.fileNames.sourceCode}${os.EOL}`);
});
});

Expand Down

0 comments on commit da1cc9e

Please sign in to comment.