From b46cdeca2680048deeb4b1dd41364b220c2c57dd Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 4 Jul 2024 17:03:02 +0530 Subject: [PATCH] Fix test cases --- .../create-template/templates/default/package.json | 4 +--- test/integration/new/template.test.ts | 13 ++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/assets/create-template/templates/default/package.json b/assets/create-template/templates/default/package.json index 3f62f87610c..4ec4467f598 100644 --- a/assets/create-template/templates/default/package.json +++ b/assets/create-template/templates/default/package.json @@ -2,9 +2,7 @@ "name": "myTemplate", "generator": { "renderer": "react", - "supportedProtocols": [ - "mqtt" - ] + "supportedProtocols": [ ] }, "dependencies": { "@asyncapi/generator-react-sdk": "^0.2.25" diff --git a/test/integration/new/template.test.ts b/test/integration/new/template.test.ts index 4040fdab64d..cff06301202 100644 --- a/test/integration/new/template.test.ts +++ b/test/integration/new/template.test.ts @@ -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(); @@ -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();