mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-08 18:05:32 +00:00
Test LMLayer.unwrap() utility function.
This commit is contained in:
parent
6e540f6b6b
commit
d5da85fde4
1 changed files with 15 additions and 1 deletions
|
|
@ -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*$/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue