Created
December 19, 2017 17:21
-
-
Save perryhoffman/3f00c6b5c2ed8d4741a2b84899add0f8 to your computer and use it in GitHub Desktop.
Account Service Unit Test Base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
describe('accountService', function () { | |
let accountService | |
let accountServiceProviderMock, gettextCatalog, configService | |
beforeEach(() => { | |
module("arkclient.accounts", $provide => { | |
accountServiceProviderMock = {} | |
gettextCatalog = {} | |
configService = { notice: sinon.stub(), getByGroupAndKey: sinon.stub() } | |
// inject the mock services | |
$provide.value('accountServiceProvider', accountServiceProviderMock) | |
$provide.value('gettextCatalog', gettextCatalog) | |
$provide.value('configService', configService) | |
$provide.value('ARKTOSHI_UNIT', Math.pow(10, 8)) | |
}) | |
inject($injector => { | |
accountService = $injector.get('accountService') | |
}) | |
}) | |
describe('createSendTransaction', function () { | |
it('just test that I can test the service...', function () { | |
console.log('create tx method ', accountService.createTransaction) | |
expect(typeof accountService.createTransaction).to.eql('function') | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment