File: test.js

package info (click to toggle)
node-mimic-fn 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 100 kB
  • sloc: makefile: 2; sh: 2
file content (21 lines) | stat: -rw-r--r-- 385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import test from 'ava';
import m from './';

test(t => {
	const symbol = Symbol('🦄');

	function foo(bar) {} // eslint-disable-line no-unused-vars
	foo.unicorn = '🦄';
	foo[symbol] = '✨';

	function wrapper() {}

	t.is(foo.name, 'foo');

	m(wrapper, foo);

	t.is(wrapper.name, 'foo');
	t.is(wrapper.length, 1);
	t.is(wrapper.unicorn, '🦄');
	t.is(wrapper[symbol], '✨');
});