Skip to content

Commit 074d498

Browse files
committed
added files for test
1 parent 409654c commit 074d498

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"format:eslint": "eslint --fix src/**/*.js",
2525
"format": "npm-run-all --sequential format:*",
2626
"release": "npm-run-all --sequential build np",
27-
"test": "echo \"Error: no test specified\""
27+
"test": "mocha",
28+
"test:watch": "mocha --watch"
2829
},
2930
"repository": {
3031
"type": "git",

test/layout.spec.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var assert = require('assert');
2+
var layouts = require('nepalify').layouts;
3+
4+
describe('layouts.romanized', () => {
5+
describe('formatKey()',() => {
6+
it('Should return corresponding Nepali character.', () => {
7+
var input = ["+", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "<", "=", ">", "?", "A", "B", "C",
8+
"D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W",
9+
"X", "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
10+
"l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~"];
11+
12+
assert.strictEqual(layouts.romanized.formatKey("+"), "\u200C");
13+
});
14+
});
15+
});

0 commit comments

Comments
 (0)