Test LMLayer.unwrap() utility function.

This commit is contained in:
Eddie Antonio Santos 2018-11-27 14:01:11 -07:00
parent 6e540f6b6b
commit d5da85fde4
No known key found for this signature in database
GPG key ID: DD411EA4D9509D87

View file

@ -5,8 +5,22 @@ let LMLayer = require('../../');
describe('LMLayer', function() {
describe('[[constructor]]', function () {
it.skip('should be take a URI to instantiate', function () {
it('should be take a URI to instantiate', function () {
new LMLayer(uri);
});
});
/**
* .unwrap() is a static function that unwraps some function code.
*/
describe('.unwrap', function () {
it('should return the inner code of a function', function () {
let text = LMLayer.unwrap(function hello() {
var hello;
var world;
});
assert.match(text, /^\s*var\s+hello;\s*var\s+world;\s*$/);
});
});
});