Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSaini101 committed Jul 4, 2024
1 parent f5d48f8 commit b46cdec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 1 addition & 3 deletions assets/create-template/templates/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"name": "myTemplate",
"generator": {
"renderer": "react",
"supportedProtocols": [
"mqtt"
]
"supportedProtocols": [ ]
},
"dependencies": {
"@asyncapi/generator-react-sdk": "^0.2.25"
Expand Down
13 changes: 6 additions & 7 deletions test/integration/new/template.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { test } from '@oclif/test';
import TestHelper from '../../helpers';
import { expect } from '@oclif/test';

import { cyan, gray } from 'picocolors';
const testHelper = new TestHelper();
const successMessage = (projectName: string) =>
'🎉 Your template is succesfully created!';
'🎉 Your template is succesfully created';

const errorMessages = {
alreadyExists: (projectName: string) =>
`Unable to create the project because the directory "${projectName}" already exists at "${process.cwd()}/${projectName}".
To specify a different name for the new project, please run the command below with a unique project name:`};

describe('new template', () => {
'Unable to create the project',
};
describe('new glee', () => {
before(() => {
try {
testHelper.deleteDummyProjectDirectory();
Expand All @@ -31,7 +30,7 @@ describe('new template', () => {
.stderr()
.stdout()
.command(['new:template', '-n=test-project'])
.it('runs new template command with name flag', async (ctx,done) => {
.it('runs new glee command with name flag', async (ctx,done) => {
expect(ctx.stderr).to.equal('');
expect(ctx.stdout).to.contains(successMessage('test-project'));
done();
Expand Down

0 comments on commit b46cdec

Please sign in to comment.