1 | 'use strict';
|
2 |
|
3 | var grunt = require('../../lib/grunt');
|
4 |
|
5 | exports['event'] = function(test) {
|
6 | test.expect(3);
|
7 | grunt.event.on('test.foo', function(a, b, c) {
|
8 |
|
9 | test.equals(a + b + c, '123', 'Should have received the correct arguments.');
|
10 | });
|
11 | grunt.event.on('test.*', function(a, b, c) {
|
12 |
|
13 | test.equals(a + b + c, '123', 'Should have received the correct arguments.');
|
14 | });
|
15 | grunt.event.emit('test.foo', '1', '2', '3');
|
16 | grunt.event.emit('test.bar', '1', '2', '3');
|
17 | test.done();
|
18 | };
|