BVB Source Codes

in-view Show registry.on.spec.js Source code

Return Download in-view: download registry.on.spec.js Source code - Download in-view Source code - Type:.js
  1. import test from 'ava';
  2. import Registry from '../src/registry';
  3.  
  4. test('Registry.on registers one handler to handlers', t => {
  5.  
  6.     let registry = Registry([]);
  7.  
  8.     registry.on('enter', () => {});
  9.     t.true(registry.handlers.enter.length === 1);
  10.  
  11.     registry.on('exit', () => {});
  12.     t.true(registry.handlers.exit.length === 1);
  13.  
  14.     registry.on('enter', () => {});
  15.     t.true(registry.handlers.enter.length === 2);
  16.  
  17. });
  18.  
  19. test('Registry.on returns the registry', t => {
  20.     let registry = Registry([]);
  21.     t.deepEqual(registry.on('enter', () => {}), registry);
  22. });
  23.  
downloadregistry.on.spec.js Source code - Download in-view Source code
Related Source Codes/Software:
magictools - 2017-01-09
elm-compiler - Compiler for Elm, a functional language for reliab... 2017-01-09
Twig - Twig, the flexible, fast, and secure template lang... 2017-01-09
android-testing - A collection of samples demonstrating different fr... 2017-01-09
lib-flexible - Scalable layout scheme 2017-01-09
sinon - Test spies, stubs and mocks for JavaScript. ... 2017-01-09
docker-gitlab - Dockerized GitLab http://www.da... 2017-01-09
Side-Menu.Android - Side menu with some categories to choose. ... 2017-01-09
libsodium - A modern and easy-to-use crypto library. 2017-01-09
prerender - Node server that uses phantomjs to render a javasc... 2017-01-09
jsdiff - A javascript text differencing implementation. 2017-04-26
hello-world - Hello world in every programming language. Thanks ... 2017-04-26
socialite - 2017-04-26
Terasology - Terasology - open source voxel world ... 2017-04-25
geddy - Web framework for Node.js h... 2017-04-25
gh-unit - DEPRECATED Test Framework for Objective-C 2017-04-25
zen - IOS, Swift, Objective - C 2017-04-25
neural-storyteller - A recurrent neural network for generating little s... 2017-04-25
CTAssetsPickerController - iOS control that allows picking multiple photos an... 2017-04-25
retire - A rich Ruby API and DSL for the Elasticsearch sear... 2017-04-25

 Back to top