From 968d1539338c05ca5b1b0baa7ed9d19da6266873 Mon Sep 17 00:00:00 2001 From: Mystic <215104920@qq.com> Date: Thu, 19 Sep 2024 20:32:48 +0800 Subject: [PATCH] fix(ts): add snapshots --- .../tests/__snapshots__/index.test.ts.snap | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 template/ts/{{cookiecutter.project_slug}}/tests/__snapshots__/index.test.ts.snap diff --git a/template/ts/{{cookiecutter.project_slug}}/tests/__snapshots__/index.test.ts.snap b/template/ts/{{cookiecutter.project_slug}}/tests/__snapshots__/index.test.ts.snap new file mode 100644 index 0000000..591331b --- /dev/null +++ b/template/ts/{{cookiecutter.project_slug}}/tests/__snapshots__/index.test.ts.snap @@ -0,0 +1,64 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`GitHub Action Configuration Handling should use default values when config is empty 1`] = ` +[ + [ + "processed_text", + "", + ], + [ + "word_count", + 0, + ], + [ + "sum", + 0, + ], + [ + "average", + 0, + ], +] +`; + +exports[`GitHub Action Text Processing should handle empty input text 1`] = ` +[ + [ + "processed_text", + "", + ], + [ + "word_count", + 0, + ], + [ + "sum", + 0, + ], + [ + "average", + 0, + ], +] +`; + +exports[`GitHub Action Text Processing should process text, count words, calculate sum and average correctly 1`] = ` +[ + [ + "processed_text", + "Hi world! Hi!", + ], + [ + "word_count", + 3, + ], + [ + "sum", + 15, + ], + [ + "average", + 3, + ], +] +`;