Skip to content

Commit

Permalink
Change notation for parsedManifestFromString and ParseManifest since …
Browse files Browse the repository at this point in the history
…being made private
  • Loading branch information
MilapNaik committed Feb 29, 2024
1 parent 6d874a6 commit f5ba839
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/RokuDeploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2419,21 +2419,21 @@ describe('index', () => {
describe('parseManifest', () => {
it('correctly parses valid manifest', async () => {
fsExtra.outputFileSync(`${rootDir}/manifest`, `title=AwesomeApp`);
let parsedManifest = await rokuDeploy.parseManifest(`${rootDir}/manifest`);
let parsedManifest = await rokuDeploy['parseManifest'](`${rootDir}/manifest`);
expect(parsedManifest.title).to.equal('AwesomeApp');
});

it('Throws our error message for a missing file', async () => {
await expectThrowsAsync(
rokuDeploy.parseManifest('invalid-path'),
rokuDeploy['parseManifest']('invalid-path'),
`invalid-path does not exist`
);
});
});

describe('parseManifestFromString', () => {
it('correctly parses valid manifest', () => {
let parsedManifest = rokuDeploy.parseManifestFromString(`
let parsedManifest = rokuDeploy['parseManifestFromString'](`
title=RokuDeployTestChannel
major_version=1
minor_version=0
Expand All @@ -2458,18 +2458,18 @@ describe('index', () => {
it('correctly converts back to a valid manifest when lineNumber and keyIndexes are provided', () => {
expect(
rokuDeploy.stringifyManifest(
rokuDeploy.parseManifestFromString('major_version=3\nminor_version=4')
rokuDeploy['parseManifestFromString']('major_version=3\nminor_version=4')
)
).to.equal(
'major_version=3\nminor_version=4'
);
});

it('correctly converts back to a valid manifest when lineNumber and keyIndexes are not provided', () => {
const parsed = rokuDeploy.parseManifestFromString('title=App\nmajor_version=3');
const parsed = rokuDeploy['parseManifestFromString']('title=App\nmajor_version=3');
delete parsed.keyIndexes;
delete parsed.lineCount;
let outputParsedManifest = rokuDeploy.parseManifestFromString(
let outputParsedManifest = rokuDeploy['parseManifestFromString'](
rokuDeploy.stringifyManifest(parsed)
);
expect(outputParsedManifest.title).to.equal('App');
Expand Down

0 comments on commit f5ba839

Please sign in to comment.