22/* global DecompressionStream */
33import pako from 'pako'
44
5- import { browserInflate } from '../src/utils/browserInflate .js'
5+ import { nativeInflate } from '../src/utils/nativeInflate .js'
66
77import { corruptZlibCases } from './__helpers__/corruptZlib.js'
88
@@ -14,22 +14,22 @@ const describeNative =
1414 ? describe
1515 : xdescribe
1616
17- describeNative ( 'browserInflate ' , ( ) => {
17+ describeNative ( 'nativeInflate ' , ( ) => {
1818 it ( 'inflates valid binary data' , async ( ) => {
1919 const bytes = Uint8Array . from ( [ 0 , 1 , 127 , 128 , 255 ] )
20- expect ( await browserInflate ( pako . deflate ( bytes ) ) ) . toEqual ( bytes )
20+ expect ( await nativeInflate ( pako . deflate ( bytes ) ) ) . toEqual ( bytes )
2121 } )
2222
2323 it ( 'inflates a valid empty stream' , async ( ) => {
2424 const bytes = new Uint8Array ( 0 )
25- expect ( await browserInflate ( pako . deflate ( bytes ) ) ) . toEqual ( bytes )
25+ expect ( await nativeInflate ( pako . deflate ( bytes ) ) ) . toEqual ( bytes )
2626 } )
2727
2828 for ( const [ name , bytes ] of corruptZlibCases ) {
2929 it ( `reports ${ name } compressed data with a nonempty error` , async ( ) => {
3030 let error = null
3131 try {
32- await browserInflate ( Uint8Array . from ( bytes ) )
32+ await nativeInflate ( Uint8Array . from ( bytes ) )
3333 } catch ( err ) {
3434 error = err
3535 }
@@ -52,7 +52,7 @@ describeNative('browserInflate', () => {
5252 }
5353 let error = null
5454 try {
55- await browserInflate ( pako . deflate ( Uint8Array . from ( [ 1 , 2 , 3 ] ) ) )
55+ await nativeInflate ( pako . deflate ( Uint8Array . from ( [ 1 , 2 , 3 ] ) ) )
5656 } catch ( err ) {
5757 error = err
5858 } finally {
0 commit comments