From 1ce263f98abd64d9148c9c71efeddcd276a71e89 Mon Sep 17 00:00:00 2001 From: "Tomachi [ICHIGO]" Date: Thu, 7 Nov 2024 07:00:55 +0900 Subject: [PATCH] chore: update test snapshot --- scripts/load-env.ps1 | 7 +++++-- scripts/update-snapshot.sh | 7 +++++++ src/__snapshots__/pixiv.test.ts.snap | 4 ---- 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100755 scripts/update-snapshot.sh diff --git a/scripts/load-env.ps1 b/scripts/load-env.ps1 index c85cf0b..64db2be 100644 --- a/scripts/load-env.ps1 +++ b/scripts/load-env.ps1 @@ -1,4 +1,7 @@ -get-content .env | foreach { - $name, $value = $_.split('=') +get-content .env | ForEach-Object { + $name, $value = $_.split('=', 2) + if ([string]::IsNullOrWhiteSpace($name) || $name.Contains('#')) { + continue + } set-content env:\$name $value } \ No newline at end of file diff --git a/scripts/update-snapshot.sh b/scripts/update-snapshot.sh new file mode 100755 index 0000000..91a45be --- /dev/null +++ b/scripts/update-snapshot.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# shellcheck disable=SC2046 +[ -f .env ] && export $(grep -v '^#' .env | xargs) + +pnpm install +pnpm run test -u diff --git a/src/__snapshots__/pixiv.test.ts.snap b/src/__snapshots__/pixiv.test.ts.snap index 3fa8f81..2477770 100644 --- a/src/__snapshots__/pixiv.test.ts.snap +++ b/src/__snapshots__/pixiv.test.ts.snap @@ -191,10 +191,6 @@ exports[`pixiv illustDetail:107565629[illust] 1`] = ` "name": "衣装チェンジ", "translated_name": null, }, - { - "name": "尊死", - "translated_name": null, - }, { "name": "Incredibly", "translated_name": null,