run npm install to generate a package lock
This commit is contained in:
22
node_modules/function-once/test/index.js
generated
vendored
Normal file
22
node_modules/function-once/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
/* IMPORT */
|
||||
|
||||
import {describe} from 'fava';
|
||||
import once from '../dist/index.js';
|
||||
|
||||
/* MAIN */
|
||||
|
||||
describe ( 'Function Once', it => {
|
||||
|
||||
it ( 'works', t => {
|
||||
|
||||
const rand = once ( () => Math.random () );
|
||||
const value = rand ();
|
||||
|
||||
t.is ( rand (), value );
|
||||
t.is ( rand (), value );
|
||||
t.is ( rand (), value );
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user