From ab47072b670f38f6191f04cd8fc99bc9c327894f Mon Sep 17 00:00:00 2001 From: fedeghe Date: Sat, 6 Jul 2019 17:12:31 +0200 Subject: [PATCH] not yet --- source/test/performances.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 source/test/performances.js diff --git a/source/test/performances.js b/source/test/performances.js deleted file mode 100644 index a2f1bca..0000000 --- a/source/test/performances.js +++ /dev/null @@ -1,32 +0,0 @@ -const assert = require('assert'), - sh = require('../dist/index.js'), - objs = require('./data/licenses.json'); -const { PerformanceObserver, performance } = require('perf_hooks'); - -const obs = new PerformanceObserver((items) => { - console.log(items.getEntries()[0].duration); - performance.clearMarks(); -}); -obs.observe({ entryTypes: ['measure'] }); - - -describe('Search starts', () => { - describe('search for MIT', () => { - - const myFunction = () => sh.forValue(objs, "MIT"); - - const fn = performance.timerify(myFunction); - const obs = new PerformanceObserver((list) => { - console.log(list.getEntries()[0]); - obs.disconnect(); - performance.clearFunctions(); - }); - obs.observe({ entryTypes: ['function'] }); - - it('should find 4 elements', () => { - search = fn(); - assert.equal(4, search.results.length); - }); - }); - -});