Skip to content

Commit d46cbb1

Browse files
committed
Migrate tests to TypeScript and improve runtime compatibility
Converted all test files from JavaScript to TypeScript, including renaming and adding new .ts test files. Updated app and converterManager to improve compatibility with bundled and SEA runtimes, including dynamic imports and robust worker file resolution. Enhanced the release workflow to run tests and handle artifact renaming for checksum files.
1 parent 23578cc commit d46cbb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3317
-695
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
- name: Install dependencies
4848
run: npm ci
4949

50+
- name: Run unit tests
51+
run: npm test
52+
5053
# Windows ffmpeg download
5154
- name: Download ffmpeg (Windows)
5255
if: matrix.platform == 'windows'
@@ -88,6 +91,9 @@ jobs:
8891
- name: Build release package
8992
run: npm run package
9093

94+
- name: Run smoke test on packaged binary
95+
run: npm run smoke:postpackage
96+
9197
# Rename archives with platform name
9298
- name: Rename archives (Windows)
9399
if: matrix.platform == 'windows'
@@ -96,16 +102,25 @@ jobs:
96102
if (Test-Path "release/EZ-Game-Audio-Conversion.zip") {
97103
Rename-Item "release/EZ-Game-Audio-Conversion.zip" "${{ matrix.artifact-name }}.zip"
98104
}
105+
if (Test-Path "release/EZ-Game-Audio-Conversion.zip.sha256") {
106+
Rename-Item "release/EZ-Game-Audio-Conversion.zip.sha256" "${{ matrix.artifact-name }}.zip.sha256"
107+
}
99108
if (Test-Path "release/EZ-Game-Audio-Conversion.7z") {
100109
Rename-Item "release/EZ-Game-Audio-Conversion.7z" "${{ matrix.artifact-name }}.7z"
101110
}
111+
if (Test-Path "release/EZ-Game-Audio-Conversion.7z.sha256") {
112+
Rename-Item "release/EZ-Game-Audio-Conversion.7z.sha256" "${{ matrix.artifact-name }}.7z.sha256"
113+
}
102114
103115
- name: Rename archives (Unix)
104116
if: matrix.platform != 'windows'
105117
run: |
106118
if [ -f "release/EZ-Game-Audio-Conversion.zip" ]; then
107119
mv "release/EZ-Game-Audio-Conversion.zip" "release/${{ matrix.artifact-name }}.zip"
108120
fi
121+
if [ -f "release/EZ-Game-Audio-Conversion.zip.sha256" ]; then
122+
mv "release/EZ-Game-Audio-Conversion.zip.sha256" "release/${{ matrix.artifact-name }}.zip.sha256"
123+
fi
109124
110125
# Upload artifacts
111126
- name: Upload release artifacts
@@ -115,6 +130,7 @@ jobs:
115130
path: |
116131
release/*.zip
117132
release/*.7z
133+
release/*.sha256
118134
if-no-files-found: error
119135

120136
release:

build/build.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ echo Build done!
8383

8484
cd ../build/frames
8585

86-
TITLE HACKED!
8786
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "$wshell = New-Object -ComObject wscript.shell;Sleep 1;$wshell.SendKeys('{F11}');"
8887

8988
echo " _____ _____ ";

dist/app.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/app.js

Lines changed: 32 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/app.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/converterManager.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/converterManager.js

Lines changed: 24 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)