Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
344 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var assert = require('assert');
|
---|
3 | var EventEmitter = require('../');
|
---|
4 |
|
---|
5 | var EE = new EventEmitter();
|
---|
6 |
|
---|
7 | assert.throws(function () {
|
---|
8 | EE.emit('error', 'Accepts a string');
|
---|
9 | }, 'Error: Unhandled error. (Accepts a string)');
|
---|
10 |
|
---|
11 | assert.throws(function () {
|
---|
12 | EE.emit('error', { message: 'Error!' });
|
---|
13 | }, 'Unhandled error. ([object Object])');
|
---|
Note:
See
TracBrowser
for help on using the repository browser.