Skip to content

Instantly share code, notes, and snippets.

@SamVerschueren
SamVerschueren / concat.d.ts
Created August 25, 2016 20:23
concat.d.ts
declare module "concat" {
function concat(a: string, b: string): string;
export = concat;
}
@SamVerschueren
SamVerschueren / index.ts
Last active August 25, 2016 19:56
index.ts
import * as objectAssign from 'object-assign';
const foo = {
foo: 'bar'
};
const unicorn = objectAssign({
unicorn: 'rainbow'
}, foo);

AVA is a JavaScript test runner that runs your tests concurrently and your files in parallel, giving you maximum speed (especially when dealing with IO!). Other features include built-in Babel (including async/await functions), test macros, watcher, TAP output, great assertion messages through power-assert. By the time of Reactive Conf we'll have even more great features.

My lightning talk would be an introduction to AVA and how it can benefit your React and Node testing with its speed, developer experience, and isolated processes. There'll be a lot of code and theory to explain why and how concurrency helps and how atomic tests make your life easier. It's a great project!

https://reactiveconf.com/

@SamVerschueren
SamVerschueren / test.js
Created November 5, 2015 12:29
AVA time calculation
import test from 'ava';
import sinon from 'sinon';
let clock;
test('Before', t => {
clock = sinon.useFakeTimers(new Date(2015, 10, 10, 15, 15, 15).getTime());
t.end();
});