Skip to content

Commit d9101e9

Browse files
committed
Fix
1 parent 985852a commit d9101e9

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ logger.error('Error level log message');
4747
logger.fatal('Fatal level log message');
4848
```
4949

50-
5150
### Package Managers
5251

5352
This library is available as a *public* module on NPM.

lib/lambda.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ module.exports = (() => {
3232
return appender(layout, config.timezoneOffset);
3333
}
3434

35-
return configure;
35+
return {
36+
configure: configure
37+
};
3638
})();

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
}
2020
],
2121
"main": "index.js",
22-
"dependencies": {
23-
24-
},
22+
"dependencies": {},
2523
"devDependencies": {
2624
"gulp": "^4.0.2",
2725
"gulp-git": "^2.10.1",

test/specs/lambdaSpec.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ console.error = jasmine.createSpy('console.error');
77
appender = require('./../../lib/lambda');
88

99
describe('When the "lambda" appender is accessed', () => {
10-
it('should return a function', () => {
11-
expect(typeof appender).toEqual('function');
10+
it('should return an object', () => {
11+
expect(typeof appender).toEqual('object');
12+
});
13+
14+
it('should have a function called "configure"', () => {
15+
expect(typeof appender.configure).toEqual('function');
1216
});
1317

1418
describe('and "configured" with a mock "layouts" and an empty "configuration" object', () => {
@@ -26,7 +30,7 @@ describe('When the "lambda" appender is accessed', () => {
2630
}
2731

2832
beforeEach(() => {
29-
appenderFn = appender({ }, { colouredLayout: layout = x => x.data });
33+
appenderFn = appender.configure({ }, { colouredLayout: layout = x => x.data });
3034
});
3135

3236
it('the "configured" appender should be a function', () => {
@@ -105,4 +109,4 @@ describe('When the "lambda" appender is accessed', () => {
105109
});
106110
});
107111
});
108-
});
112+
});

0 commit comments

Comments
 (0)