1
1
/* eslint-disable @typescript-eslint/no-require-imports */
2
2
/* eslint-disable no-undef */
3
+ const assert = require ( "assert" ) ;
3
4
const addon = require ( "bindings" ) ( "addon.node" ) ;
4
- // const assert = require("assert");
5
5
6
6
const toLocaleString = ( text ) => {
7
7
return text
@@ -11,16 +11,16 @@ const toLocaleString = (text) => {
11
11
. join ( "" ) ;
12
12
} ;
13
13
14
- // module.exports = async () => {
15
- console . log ( toLocaleString ( addon . newBuffer ( ) ) , addon . theText ) ;
16
- console . log ( toLocaleString ( addon . newExternalBuffer ( ) ) , addon . theText ) ;
17
- console . log ( toLocaleString ( addon . copyBuffer ( ) ) , addon . theText ) ;
18
- let buffer = addon . staticBuffer ( ) ;
19
- console . log ( addon . bufferHasInstance ( buffer ) , true ) ;
20
- console . log ( addon . bufferInfo ( buffer ) , true ) ;
21
- addon . invalidObjectAsBuffer ( { } ) ;
14
+ module . exports = ( ) => {
15
+ assert . strictEqual ( toLocaleString ( addon . newBuffer ( ) ) , addon . theText ) ;
16
+ assert . strictEqual ( toLocaleString ( addon . newExternalBuffer ( ) ) , addon . theText ) ;
17
+ assert . strictEqual ( toLocaleString ( addon . copyBuffer ( ) ) , addon . theText ) ;
18
+ let buffer = addon . staticBuffer ( ) ;
19
+ assert . strictEqual ( addon . bufferHasInstance ( buffer ) , true ) ;
20
+ assert . strictEqual ( addon . bufferInfo ( buffer ) , true ) ;
21
+ addon . invalidObjectAsBuffer ( { } ) ;
22
22
23
- // TODO: Add gc tests
24
- // @see
25
- // https://github.com/callstackincubator/react-native-node-api/issues/182
26
- // };
23
+ // TODO: Add gc tests
24
+ // @see
25
+ // https://github.com/callstackincubator/react-native-node-api/issues/182
26
+ } ;
0 commit comments