From 55b9e2aff62f106fa188bb4734ffa210fe296315 Mon Sep 17 00:00:00 2001 From: "zhenhui.lin" <315713565@163.com> Date: Fri, 28 Apr 2017 10:33:07 +0800 Subject: [PATCH] =?UTF-8?q?constant=20=E8=87=AA=E5=8A=A8=E5=8C=96=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constant/constant.spec.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/constant/constant.spec.js diff --git a/src/constant/constant.spec.js b/src/constant/constant.spec.js new file mode 100644 index 0000000..0320e2c --- /dev/null +++ b/src/constant/constant.spec.js @@ -0,0 +1,25 @@ +/* eslint max-nested-callbacks: off */ +/* eslint-env mocha */ +/* global expect */ + +import angular from 'angular'; +import 'angular-mocks'; + +import ConfExample from './conf.example'; + +describe('Constant 常量定义', function () { + const { module, inject } = angular.mock; + + beforeEach(function () { + module(ConfExample); + }); + + describe('检查常量', function () { + it('检查常量的值', function () { + inject(function (USER_JWT_TOKEN, LOCALSTORAGE_PREFIX) { + expect(USER_JWT_TOKEN).to.equal('USER_JWT_TOKEN'); + expect(LOCALSTORAGE_PREFIX).to.equal('LOCALSTORAGE'); + }); + }); + }); +});