Skip to content

Commit 49cc883

Browse files
committed
Merge branch 'more-test-fixes' into release/5.3.0
Mergin in more test fixes
2 parents 9023625 + eefc899 commit 49cc883

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

src/exportDataAction/ExportDataTaskSpec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ define([
6262

6363
describe('when invoked', () => {
6464

65-
beforeEach(async (done) => {
65+
beforeEach(async () => {
6666
await task.invoke();
67-
done();
6867
});
6968

7069
it('requests comprehensive telemetry for all objects', () => {

src/persistence/test/MCWSPersistenceProviderSpec.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,13 @@ describe('The MCWS Persistence Provider', () => {
5656
);
5757
});
5858

59-
it('provides a promise for available namespaces', async (done) => {
59+
it('provides a promise for available namespaces', async () => {
6060
const spaces = await mcwsPersistenceProvider.getPersistenceNamespaces();
6161
expect(spaces).toEqual(persistenceNamespaces);
62-
done();
6362
});
6463

6564
// DO WE DELETE THIS TEST? I don't think we use this functionality anymore.
66-
xit('provides a listing of namespaces when provided a namespace definition', async (done) => {
65+
xit('provides a listing of namespaces when provided a namespace definition', async () => {
6766
const namespaceTriples = [
6867
{
6968
Subject: '/test/namespace/a',
@@ -95,10 +94,9 @@ describe('The MCWS Persistence Provider', () => {
9594

9695
const objects = await mcwsPersistenceProvider.getNamespacesFromMCWS({ url: '/test/namespace' });
9796
expect(objects).toEqual(namespaceTriples);
98-
done();
9997
});
10098

101-
it('allows objects to be created', async (done) => {
99+
it('allows objects to be created', async () => {
102100
mockOpaqueFile.create.and.returnValue(Promise.resolve(true));
103101
const domainObject = {
104102
identifier: {
@@ -114,10 +112,9 @@ describe('The MCWS Persistence Provider', () => {
114112
.toHaveBeenCalledWith('testKey');
115113
expect(mockOpaqueFile.create)
116114
.toHaveBeenCalledWith({ someKey: 'some value' });
117-
done();
118115
});
119116

120-
it('allows objects to be read', async (done) => {
117+
it('allows objects to be read', async () => {
121118
const identifier = {
122119
key: 'testKey',
123120
namespace: 'testSpace'
@@ -139,10 +136,9 @@ describe('The MCWS Persistence Provider', () => {
139136
.toHaveBeenCalledWith('testKey');
140137
expect(mockOpaqueFile.read)
141138
.toHaveBeenCalled();
142-
done();
143139
});
144140

145-
it('allows objects to be updated', async (done) => {
141+
it('allows objects to be updated', async () => {
146142
mockOpaqueFile.replace.and.returnValue(Promise.resolve(true));
147143
const domainObject = {
148144
identifier: {
@@ -160,11 +156,10 @@ describe('The MCWS Persistence Provider', () => {
160156
.toHaveBeenCalledWith('testKey');
161157
expect(mockOpaqueFile.replace)
162158
.toHaveBeenCalledWith({ someKey: 'some value' });
163-
done();
164159
});
165160

166161
// We don't allow delete in the core API, so we don't need this test.
167-
xit('allows objects to be deleted', async (done) => {
162+
xit('allows objects to be deleted', async () => {
168163
mockOpaqueFile.remove.and.returnValue(Promise.resolve(true));
169164
await mcwsPersistenceProvider.delete({ key: 'testKey', namespace: 'testSpace' });
170165

@@ -173,14 +168,12 @@ describe('The MCWS Persistence Provider', () => {
173168
expect(mockNamespace.opaqueFile)
174169
.toHaveBeenCalledWith('testKey');
175170
expect(mockOpaqueFile.remove).toHaveBeenCalled();
176-
done();
177171
});
178172

179-
it('converts rejected promises to promises resolves to undefined', async (done) => {
173+
it('converts rejected promises to promises resolves to undefined', async () => {
180174
mockOpaqueFile.read.and.returnValue(Promise.reject('hello'));
181175
const result = await mcwsPersistenceProvider.get({ key: 'testKey', namespace: 'testSpace' });
182176

183177
expect(result).toBeUndefined();
184-
done();
185178
});
186179
});

0 commit comments

Comments
 (0)