Yuki Takei 2 tahun lalu
induk
melakukan
a74598a5f2
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  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', () => {