Skip to content

Instantly share code, notes, and snippets.

@Nasicus
Created December 19, 2017 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nasicus/627e7fd05dd58121336cdf6e14927ab2 to your computer and use it in GitHub Desktop.
Save Nasicus/627e7fd05dd58121336cdf6e14927ab2 to your computer and use it in GitHub Desktop.
'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)
})
inject($injector => {
accountService = $injector.get('accountService')
})
})
describe('createSendTransaction', function () {
it('just test that I can test the service...', function () {
// const stub = sinon.stub(accountService, 'fetchAndParse').resolves('OK')
var result = accountService.arkToshiToArk(100000, false)
expect(result).to.eql(1)
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment