Skip to content

Commit 2e299ab

Browse files
committed
Updating invalid type test
1 parent 377d2d5 commit 2e299ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tools/storage-key-recipe-resolver.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ export class StorageKeyRecipeResolver {
6262
*/
6363
async resolveOrNormalize(recipe: Recipe, arc: Arc, opts?: IsValidOptions): Promise<Recipe | null> {
6464
const normalized = recipe.clone();
65-
normalized.normalize();
65+
const successful = normalized.normalize(opts);
66+
if (!successful) return null;
6667
if (normalized.isResolved()) return normalized;
6768

6869
return await (new RecipeResolver(arc).resolve(recipe, opts));

src/tools/tests/storage-key-recipe-resolver-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ describe('recipe2plan', () => {
128128
}
129129
});
130130
it('Invalid Type: If Reader reads {name: Text, age: Number} it is not valid', async () => {
131-
132131
const manifest = await Manifest.parse(`\
133132
particle Reader
134133
data: reads Thing {name: Text, age: Number}
@@ -158,7 +157,7 @@ describe('recipe2plan', () => {
158157
for await (const it of resolver.resolve()) {
159158
continue;
160159
}
161-
});
160+
}, /Recipe ReadingRecipe failed to resolve:/);
162161
});
163162
// TODO(alxr): Flush out outlined unit tests
164163
it.skip('No arc id: If arcId of WritingRecipe is not there, it is not valid', () => {});

0 commit comments

Comments
 (0)