Skip to content

Commit

Permalink
patch: Suite serialization without output
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Aug 4, 2023
1 parent debd0f2 commit 1d38a39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/vest/src/exports/SuiteSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { Suite } from 'SuiteTypes';

export class SuiteSerializer {
static serialize(suite: Suite<TFieldName, TGroupName>) {
return IsolateSerializer.serialize(suite.dump());
const dump = { ...suite.dump(), output: undefined };

return IsolateSerializer.serialize(dump);
}

static deserialize(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`SuiteSerializer Should produce a valid serialized dump 1`] = `"{"children":[{"$":"Focused","D":{"focusMode":0,"match":["field_1"],"matchAll":false}},{"$":"Test","D":{"severity":"error","status":"FAILED","fieldName":"field_1","message":"field_1_message"}},{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_2","message":"field_2_message"}},{"children":[{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_3","groupName":"group_1","message":"field_3_message_1"}},{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_3","groupName":"group_1","message":"field_3_message_2"}},{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_4","groupName":"group_1","message":"field_4_message"}}],"$":"Group","D":{}},{"children":[{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_5","message":"field_5_message"}}],"$":"SkipWhen","D":{}}],"$":"Suite","D":{"optional":{}},"output":{"errorCount":1,"warnCount":0,"testCount":1,"errors":[{"fieldName":"field_1","message":"field_1_message"}],"warnings":[],"groups":{"group_1":{"field_3":{"errorCount":0,"warnCount":0,"testCount":0,"errors":[],"warnings":[],"valid":false},"field_4":{"errorCount":0,"warnCount":0,"testCount":0,"errors":[],"warnings":[],"valid":false}}},"tests":{"field_1":{"errorCount":1,"warnCount":0,"testCount":1,"errors":["field_1_message"],"warnings":[],"valid":false},"field_2":{"errorCount":0,"warnCount":0,"testCount":0,"errors":[],"warnings":[],"valid":false},"field_3":{"errorCount":0,"warnCount":0,"testCount":0,"errors":[],"warnings":[],"valid":false},"field_4":{"errorCount":0,"warnCount":0,"testCount":0,"errors":[],"warnings":[],"valid":false},"field_5":{"errorCount":0,"warnCount":0,"testCount":0,"errors":[],"warnings":[],"valid":false}},"valid":false,"suiteName":"suite_serialize_test"}}"`;
exports[`SuiteSerializer Should produce a valid serialized dump 1`] = `"{"children":[{"$":"Focused","D":{"focusMode":0,"match":["field_1"],"matchAll":false}},{"$":"Test","D":{"severity":"error","status":"FAILED","fieldName":"field_1","message":"field_1_message"}},{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_2","message":"field_2_message"}},{"children":[{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_3","groupName":"group_1","message":"field_3_message_1"}},{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_3","groupName":"group_1","message":"field_3_message_2"}},{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_4","groupName":"group_1","message":"field_4_message"}}],"$":"Group","D":{}},{"children":[{"$":"Test","D":{"severity":"error","status":"SKIPPED","fieldName":"field_5","message":"field_5_message"}}],"$":"SkipWhen","D":{}}],"$":"Suite","D":{"optional":{}}}"`;

2 comments on commit 1d38a39

@vercel
Copy link

@vercel vercel bot commented on 1d38a39 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest – ./website

vest-git-latest-ealush.vercel.app
vest.vercel.app
www.vestjs.dev
vest-ealush.vercel.app
vestjs.dev

@vercel
Copy link

@vercel vercel bot commented on 1d38a39 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest-next – ./website

vest-next-ealush.vercel.app
vest-next.vercel.app
vest-website.vercel.app
vest-next-git-latest-ealush.vercel.app

Please sign in to comment.