Skip to content

Commit f5e416a

Browse files
committed
merged development & fix lint errors
1 parent 5d1db53 commit f5e416a

File tree

3 files changed

+28
-26
lines changed

3 files changed

+28
-26
lines changed

lib/stack/auditlog/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import cloneDeep from 'lodash/cloneDeep'
22
import error from '../../core/contentstackError'
3-
import { fetchAll, parseData } from '../../entity'
3+
import { fetchAll } from '../../entity'
44

55
/**
66
*

lib/stack/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ export function Stack (http, data) {
810810
*/
811811
this.delete = deleteEntity(http)
812812

813-
/**
813+
/**
814814
* @description Audit log displays a record of all the activities performed in a stack and helps you keep a track of all published items, updates, deletes, and current status of the existing content.
815815
* @param {String}
816816
* @returns {AuditLog}
Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
import { expect } from "chai";
2-
import { describe, it, setup } from "mocha";
3-
import { jsonReader } from "../utility/fileOperations/readwrite.js";
1+
import { expect } from 'chai'
2+
import { describe, it, setup } from 'mocha'
3+
import { jsonReader } from '../utility/fileOperations/readwrite.js'
44

5-
import { contentstackClient } from "../utility/ContentstackClient.js";
5+
import { contentstackClient } from '../utility/ContentstackClient.js'
66

7-
let client = {};
8-
let uid = "";
9-
describe("Audit Log api Test", () => {
7+
let client = {}
8+
let uid = ''
9+
describe('Audit Log api Test', () => {
1010
setup(() => {
11-
const user = jsonReader("loggedinuser.json");
12-
client = contentstackClient(user.authtoken);
13-
});
11+
const user = jsonReader('loggedinuser.json')
12+
client = contentstackClient(user.authtoken)
13+
})
1414

15-
it("Should Fetch all the Audit Logs", async () => {
16-
const response = await makeAuditLog().fetchAll();
17-
uid = response.items[0].uid;
18-
expect(Array.isArray(response.items)).to.be.true;
19-
expect(response.items[0].uid).not.to.be.undefined;
20-
});
15+
it('Should Fetch all the Audit Logs', async () => {
16+
const response = await makeAuditLog().fetchAll()
17+
uid = response.items[0].uid
18+
// eslint-disable-next-line no-unused-expressions
19+
expect(Array.isArray(response.items)).to.be.true
20+
// eslint-disable-next-line no-unused-expressions
21+
expect(response.items[0].uid).not.to.be.undefined
22+
})
2123

22-
it("Should Fetch a single audit log", async () => {
23-
const response = await makeAuditLog(uid).fetch();
24-
console.log(response);
25-
expect(response.log.uid).to.be.equal(uid);
26-
});
27-
});
24+
it('Should Fetch a single audit log', async () => {
25+
const response = await makeAuditLog(uid).fetch()
26+
console.log(response)
27+
expect(response.log.uid).to.be.equal(uid)
28+
})
29+
})
2830

29-
function makeAuditLog(uid = null) {
30-
return client.stack({ api_key: process.env.API_KEY }).auditLog(uid);
31+
function makeAuditLog (uid = null) {
32+
return client.stack({ api_key: process.env.API_KEY }).auditLog(uid)
3133
}

0 commit comments

Comments
 (0)