Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/constant/constant.spec.js
Original file line number Diff line number Diff line change
@@ -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');
});
});
});
});