Coder Social home page Coder Social logo

browser-ava's Introduction

Hi there ๐Ÿ‘‹

Top Langs

ReadMe Card ReadMe Card ReadMe Card

skill

browser-ava's People

Contributors

1000i100 avatar arlac77 avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

1000i100

browser-ava's Issues

Regression between 1.1.0 and 1.2.0 (and up to 1.3.2)

Something there : v1.1.0...v1.2.0
Make Firefox run slower.
As a consequence, this test was passing and now fail :

import test from 'ava';

async function timeTrack(arrayFuncAndParams,timeout){
	return Promise.race([
		new Promise(resolve => setTimeout(
				()=>resolve({ms:timeout,params:arrayFuncAndParams,timeout:true}),
				timeout
			)),
		new Promise(async resolve=>{
			const startTime = Date.now();
			const func = arrayFuncAndParams[0];
			const params = arrayFuncAndParams.slice(1);

			const res = await func(...params);
			const endTime = Date.now();
			const elapsed = endTime - startTime;
			resolve({ms:elapsed,params:arrayFuncAndParams,result:res});
		})]
	);
}

test('pingTracker give time elapsed', async t => {
	await sleep(1); // in some test environnement this fix latency bug.
	const mockedFunc = async (first,second)=>{await sleep(second);return first};
	const firstParameter = 'finalResult';
	const secondParameter = 11;
	const toCall = [mockedFunc,firstParameter,secondParameter];
	const timeout = 1000;
	const result = await timeTrack(toCall,timeout);
	t.is(result.result,firstParameter);
	t.is(result.params[1],firstParameter);
	t.regex(result.ms.toString(),/1[0-9]/);
});

PS : I run it with browser-ava **.test.mjs --chromium --firefox

do not try to send BigInt as json

When BigInt values are involved the following error occurs:

Unhandled Promise Rejection: TypeError: JSON.stringify cannot serialize BigInt.

FEAT: watch mode

reload an re execute tests when test or imported code has changed on disk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.