Skip to content

Commit

Permalink
fix test issue in code apache#971
Browse files Browse the repository at this point in the history
  • Loading branch information
Vidhya Sagar committed Feb 4, 2024
1 parent 4da2d8b commit dfa94f9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions karavan-core/test/plain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {expect} from 'chai';
import * as fs from 'fs';
import 'mocha';
import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml";
import {Integration} from "../src/core/model/IntegrationDefinition";
import {FinallyDefinition} from "../lib/model/CamelDefinition";


describe('Plain YAML to integration', () => {
Expand Down Expand Up @@ -57,7 +55,7 @@ describe('Plain YAML to integration', () => {
const i = CamelDefinitionYaml.yamlToIntegration("test1.yaml", yaml1);
(i.spec.flows?.at(0)).autoStartup = false;
const y = CamelDefinitionYaml.integrationToYaml(i);
expect(y).to.equal(yaml2);
expect(y).to.equal(yaml2.replaceAll("\r\n", "\n")); // replace for Windows compatibility
});

it('YAML <-> Integration', () => {
Expand All @@ -68,7 +66,7 @@ describe('Plain YAML to integration', () => {
expect(i.spec.flows?.length).to.equal(1);
expect(i.type).to.equal('plain');
const yaml2 = CamelDefinitionYaml.integrationToYaml(i);
expect(yaml.replace("\r\n", "\n")).to.equal(yaml2); // replace for Windows compatibility
expect(yaml.replaceAll("\r\n", "\n")).to.equal(yaml2); // replace for Windows compatibility
});

});

0 comments on commit dfa94f9

Please sign in to comment.