appcenter-data
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -80,8 +80,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
describe('App Center Data list operation tests', () => { | ||
test('list is called ', async () => { | ||
test('list is called with partition and TimeToLive.NOCACHE', async () => { | ||
const partition = Data.DefaultPartitions.USER_DOCUMENTS; | ||
const spy = jest.spyOn(NativeModules.AppCenterReactNativeData, 'list'); | ||
const readOptions = { timeToLive: Data.TimeToLive.NO_CACHE }; | ||
const result = await Data.list(partition, readOptions); | ||
console.log(result); | ||
expect(spy).toHaveBeenCalledWith(partition, readOptions); | ||
expect(result).toHaveProperty('currentPage'); | ||
expect(result).toHaveProperty('hasNextPage'); | ||
expect(result).toHaveProperty('getNextPage'); | ||
expect(result).toHaveProperty('close'); | ||
}); | ||
}); | ||
describe('App Center Data list operation tests', () => { | ||
test('list is called with partition and default TTL TimeToLive.DEFAULT', async () => { | ||
const partition = Data.DefaultPartitions.USER_DOCUMENTS; | ||
const spy = jest.spyOn(NativeModules.AppCenterReactNativeData, 'list'); | ||
const result = await Data.list(partition); | ||
console.log(result); | ||
expect(spy).toHaveBeenCalledWith(partition); | ||
const readOptions = { timeToLive: Data.TimeToLive.DEFAULT }; | ||
expect(spy).toHaveBeenCalledWith(partition, readOptions); | ||
expect(result).toHaveProperty('currentPage'); | ||
@@ -88,0 +104,0 @@ expect(result).toHaveProperty('hasNextPage'); |
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
export const enum TimeToLive { | ||
export enum TimeToLive { | ||
INFINITE = -1, | ||
@@ -10,3 +10,3 @@ NO_CACHE = 0, | ||
export const enum DefaultPartitions { | ||
export enum DefaultPartitions { | ||
USER_DOCUMENTS = 'user', | ||
@@ -13,0 +13,0 @@ APP_DOCUMENTS = 'readonly' |
{ | ||
"name": "appcenter-data", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "React Native plugin for AppCenter Data", | ||
@@ -23,3 +23,3 @@ "main": "Data.js", | ||
"dependencies": { | ||
"appcenter": "2.5.0" | ||
"appcenter": "2.6.0" | ||
}, | ||
@@ -26,0 +26,0 @@ "rnpm": { |
@@ -36,4 +36,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
[ | ||
{ pod: 'AppCenter/Data', version: '2.5.0' }, | ||
{ pod: 'AppCenterReactNativeShared', version: '2.5.0' } // in case people don't link appcenter (core) | ||
{ pod: 'AppCenter/Data', version: '2.5.1' }, | ||
{ pod: 'AppCenterReactNativeShared', version: '2.6.0' } // in case people don't link appcenter (core) | ||
], | ||
@@ -40,0 +40,0 @@ { platform: 'ios', version: '9.0' } |
Sorry, the diff of this file is not supported yet
89676
573
+ Addedappcenter@2.6.0(transitive)
+ Addedappcenter-link-scripts@2.6.0(transitive)
- Removedappcenter@2.5.0(transitive)
- Removedappcenter-link-scripts@2.5.0(transitive)
Updatedappcenter@2.6.0