Skip to content

Commit 899fc14

Browse files
author
James Vidler
authored
Revert "fix to babelrc"
1 parent 37e8c09 commit 899fc14

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

.babelrc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"presets": [
3-
[
4-
"@babel/preset-env",
5-
{
6-
"targets": {
7-
"node": "10"
8-
}
9-
}]
3+
"@babel/preset-env"
104
],
115
"sourceMaps": true,
126
"retainLines": true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Don't have an Agility CMS instance? Sign up for [Free (forever)](https://account
1616
- Query a content list using a filter syntax
1717
- Get the details of a media gallery
1818
- Keep track of syncing content to your app
19+
- Optional in-memory caching
1920

2021
## Getting Started
2122
In order to use this sdk, you'll need to install the script and you'll also need to authenticate your requests.

package-lock.json

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/getApi.tests.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,21 @@ describe('getApi:', function() {
153153
done();
154154
});
155155

156+
it('should throw an error if caching maxAge is passed-in and is not a number', function(done) {
157+
expect(function() {
158+
var api = agility.getApi({
159+
guid: 'some-guid',
160+
apiKey: 'some-access-token',
161+
caching: {
162+
maxAge: 'ten thousand miliseconds'
163+
}
164+
});
165+
assert.strictEqual(typeof(api), "object");
166+
done();
167+
}).to.throw( TypeError );
168+
done();
169+
});
170+
156171

157172
it('should throw an error if baseUrl is passed-in and is does not start with "https"', function(done) {
158173
expect(function() {

0 commit comments

Comments
 (0)