-
Notifications
You must be signed in to change notification settings - Fork 59
/
hookfile.js
47 lines (37 loc) · 827 Bytes
/
hookfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// ABAO hooks file {{! Mustache template }}
// Generated from RAML specification
// RAML: {{ramlFile}}
// Date: {{timestamp}}
// <https://github.com/cybertk/abao>
//
var
hooks = require('hooks'),
assert = require('chai').assert;
//
// Setup/Teardown
//
hooks.beforeAll(function (done) {
done();
});
hooks.afterAll(function (done) {
done();
});
//
// Hooks
//
{{#hooks}}
//-----------------------------------------------------------------------------
hooks.before('{{{name}}}', function (test, done) {
{{#comment}}
// Modify 'test.request' properties here to modify the inbound request
{{/comment}}
done();
});
hooks.after('{{{name}}}', function (test, done) {
{{#comment}}
// Assert against 'test.response' properties here to verify expected results
{{/comment}}
done();
});
{{/hooks}}