소스 검색

fix tests

Yuki Takei 2 년 전
부모
커밋
a74598a5f2
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      packages/preset-templates/test/index.test.ts

+ 4 - 4
packages/preset-templates/test/index.test.ts

@@ -26,10 +26,10 @@ it('Validation for package.json should be return data', () => {
 
 it('Scanning the templates ends up with no errors', async() => {
   // when
-  const caller = async() => { await scanAllTemplateStatus(projectDirRoot) };
+  const results = await scanAllTemplateStatus(projectDirRoot);
 
   // then
-  await expect(caller).rejects.not.toThrow();
+  expect(results).not.toBeNull();
 });
 
 it('Scanning the templates ends up with no errors with opts.data', async() => {
@@ -38,10 +38,10 @@ it('Scanning the templates ends up with no errors with opts.data', async() => {
   const data = validateTemplatePluginPackageJson(projectDirRoot);
 
   // when
-  const caller = async() => { await scanAllTemplateStatus(projectDirRoot, { data }) };
+  const results = await scanAllTemplateStatus(projectDirRoot, { data });
 
   // then
-  await expect(caller).rejects.not.toThrow();
+  expect(results).not.toBeNull();
 });
 
 it('Validation templates returns true', () => {