Skip to content

Commit

Permalink
chore: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoppippi committed Jan 18, 2025
1 parent 1de0fae commit a342ba1
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 24 deletions.
8 changes: 5 additions & 3 deletions packages/unplugin-typia/tests/fixtures/__snapshots__/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ const validate = (() => { const _io0 = (input: any): boolean => "string" === typ
value: input
}))(input, "$input", true);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : undefined
data: input
} as any;
}
return {
success: true,
errors: [],
data: input
} as any;
}; })();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ const validate = /* @__PURE__ */ (() => {
_report = __typia_transform__validateReport._validateReport(errors);
/* @__PURE__ */ ((input2, _path, _exceptionable = true) => true)(input, "$input", true);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : void 0
data: input
};
}
return {
success: true,
errors: [],
data: input
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ const validate = /* @__PURE__ */ (() => {
value: input2
}))(input, "$input", true);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : void 0
data: input
};
}
return {
success: true,
errors: [],
data: input
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ const validate = /* @__PURE__ */ (() => {
errors = [];
__typia_transform__validateReport._validateReport(errors);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : void 0
data: input
};
}
return {
success: true,
errors: [],
data: input
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@ const validate = /* @__PURE__ */ (() => {
value: input2
}))(input, "$input", true);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : void 0
data: input
};
}
return {
success: true,
errors: [],
data: input
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ const validate = (() => { const _io0 = (input: any): boolean => "string" === typ
value: input
}))(input, "$input", true);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : undefined
data: input
} as any;
}
return {
success: true,
errors: [],
data: input
} as any;
}; })();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,17 @@ const validate = /* @__PURE__ */ (() => {
value: input2
}))(input, "$input", true);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : void 0
data: input
};
}
return {
success: true,
errors: [],
data: input
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,17 @@ const validate = /* @__PURE__ */ (() => {
value: input2
}))(input, "$input", true);
const success = 0 === errors.length;
return {
return success ? {
success,
data: input
} : {
success,
errors,
data: success ? input : void 0
data: input
};
}
return {
success: true,
errors: [],
data: input
};
};
Expand Down

0 comments on commit a342ba1

Please sign in to comment.