File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
test/cases/wasm/unused-export Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ it ( "should allow wasm with unused exports" , function ( ) {
2+ return import ( "./module" ) . then ( function ( module ) {
3+ const result = module . run ( ) ;
4+ expect ( result ) . toEqual ( 42 ) ;
5+ } ) ;
6+ } ) ;
Original file line number Diff line number Diff line change 1+ import { getNumber } from "./wasm.wat" ;
2+
3+ export function run ( ) {
4+ return getNumber ( ) ;
5+ }
Original file line number Diff line number Diff line change 1+ var supportsWebAssembly = require ( "../../../helpers/supportsWebAssembly" ) ;
2+
3+ module . exports = function ( config ) {
4+ return supportsWebAssembly ( ) ;
5+ } ;
Original file line number Diff line number Diff line change 1+ (module
2+ (type $t0 (func (param i32 i32 ) (result i32 )))
3+ (type $t1 (func (result i32 )))
4+ (func $add (export " add" ) (type $t0 ) (param $p0 i32 ) (param $p1 i32 ) (result i32 )
5+ (i32.add
6+ (get_local $p0 )
7+ (get_local $p1 )))
8+ (func $getNumber (export " getNumber" ) (type $t1 ) (result i32 )
9+ (i32.const 42 )))
10+
You can’t perform that action at this time.
0 commit comments