From e86059d2a7eaf31fdd35de5806d7d08c0d48d6a8 Mon Sep 17 00:00:00 2001 From: syt123450 <421537891@qq.com> Date: Tue, 25 Sep 2018 20:14:57 -0700 Subject: [PATCH] add basic structure for tensorspace unit test (#52) --- .babelrc | 3 +++ package.json | 2 +- test/mocha.opts | 1 + test/unit/Layers.tests.js | 17 +++++++++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .babelrc create mode 100644 test/mocha.opts create mode 100644 test/unit/Layers.tests.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..af0f0c3d --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["es2015"] +} \ No newline at end of file diff --git a/package.json b/package.json index 52138ac9..cbae3e80 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "build/tensorspace.module.js", "scripts": { "test": "mocha", - "build-beautify": "rollup -c", + "build": "rollup -c", "build-uglify": "rollup -c && uglifyjs build/tensorspace.js -cm --preamble \"// https://github.com/syt123450/tensorspace/blob/master/LICENSE\" --output build/tensorspace.min.js", "contributors:add": "all-contributors add", "contributors:generate": "all-contributors generate" diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 00000000..333e9075 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1 @@ +--recursive --require babel-core/register \ No newline at end of file diff --git a/test/unit/Layers.tests.js b/test/unit/Layers.tests.js new file mode 100644 index 00000000..e3e4d397 --- /dev/null +++ b/test/unit/Layers.tests.js @@ -0,0 +1,17 @@ +import { CenterLocator } from "../../src/utils/CenterLocator"; +import chai from "chai" + +describe('Test Conv2d', function () { + + console.log(555); + + it('Should has a 3d output shape', function () { + + let outputDimension = 3; + + console.log(777); + + chai.expect( 3 ).to.equal(outputDimension); + + }); +}); \ No newline at end of file