Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
efced405
Commit
efced405
authored
Nov 20, 2020
by
Jerome Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add libwebp test
parent
e065dda9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
data
wasm/tests/data
+1
-1
libwebp.test.js
wasm/tests/libwebp.test.js
+18
-0
No files found.
data
@
39dfdf21
Subproject commit
4fe872bd290fb13ffbb808f3855018c745fcda1d
Subproject commit
39dfdf2129cffec578970eee38846d3e8c1652b2
wasm/tests/libwebp.test.js
0 → 100644
View file @
efced405
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
const
{
TIMEOUT
}
=
require
(
'./config'
);
const
{
runFFmpeg
}
=
require
(
'./utils'
);
const
IN_FILE_NAME
=
'image.png'
;
const
OUT_FILE_NAME
=
'image.webp'
;
const
FILE_SIZE
=
6376
;
let
pngData
=
null
;
beforeAll
(()
=>
{
pngData
=
Uint8Array
.
from
(
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'data'
,
IN_FILE_NAME
)));
});
test
(
'transcode png to webp'
,
async
()
=>
{
const
args
=
[
'-i'
,
IN_FILE_NAME
,
OUT_FILE_NAME
];
const
{
fileSize
}
=
await
runFFmpeg
(
IN_FILE_NAME
,
pngData
,
args
,
OUT_FILE_NAME
);
expect
(
fileSize
).
toBe
(
FILE_SIZE
);
},
TIMEOUT
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment