flaschenpost
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -66,2 +66,6 @@ 'use strict'; | ||
if (this.module) { | ||
throw new Error('Module already set.'); | ||
} | ||
this.module = { | ||
@@ -68,0 +72,0 @@ name: module.name, |
{ | ||
"name": "flaschenpost", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "flaschenpost is a logger for cloud-based applications.", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
@@ -241,3 +241,19 @@ 'use strict'; | ||
}); | ||
test('throws an error if the module was already configured.', function (done) { | ||
var configuration = new Configuration(); | ||
configuration.setModule({ | ||
name: 'foo', | ||
version: '0.0.1' | ||
}); | ||
assert.that(function () { | ||
configuration.setModule({ | ||
name: 'foo', | ||
version: '0.0.1' | ||
}); | ||
}, is.throwing('Module already set.')); | ||
done(); | ||
}); | ||
}); | ||
}); |
39516
1059