deepFreeze(store.getState());
});
- it('validating error in policyException', done => {
+ it('validating error in policyException', () => {
let textStatus = '', errorThrown = '';
let xhr = {
responseJSON: {
errorResponseHandler(xhr, textStatus, errorThrown);
- setTimeout(function () {
- expect(store.getState()).toEqual(expectedStore);
- done();
- }, 100);
+ expect(store.getState()).toEqual(expectedStore);
});
- it('validating error in serviceException with variables', done => {
+ it('validating error in serviceException with variables', () => {
let textStatus = '', errorThrown = '';
let xhr = {
responseJSON: {
errorResponseHandler(xhr, textStatus, errorThrown);
- setTimeout(function () {
- expect(store.getState()).toEqual(expectedStore);
- done();
- }, 100);
+ expect(store.getState()).toEqual(expectedStore);
});
- it('validating error in response', done => {
+ it('validating error in response', () => {
let textStatus = '', errorThrown = '';
let xhr = {
responseJSON: {
errorResponseHandler(xhr, textStatus, errorThrown);
- setTimeout(function () {
- expect(store.getState()).toEqual(expectedStore);
- done();
- }, 100);
+ expect(store.getState()).toEqual(expectedStore);
});
- it('validating error in request', done => {
+ it('validating error in request', () => {
let textStatus = '', errorThrown = '';
let xhr = {
statusText: '500',
errorResponseHandler(xhr, textStatus, errorThrown);
- setTimeout(function () {
- expect(store.getState()).toEqual(expectedStore);
- done();
- }, 100);
+ expect(store.getState()).toEqual(expectedStore);
});
});