Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module.exports = {

// The following rules cause problems for our existing tests, so they are disabled for now:
'mocha/no-skipped-tests': 'off',
'mocha/no-hooks-for-single-case': 'off',
},
},
],
Expand Down
27 changes: 12 additions & 15 deletions test/functional/deprecated/iWorkFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,25 +210,22 @@ describe('iWork Functional Tests', function () {
});

describe('getDataArea', function () {
before('init lib, data area, and add data', function (done) {
it('returns contents of a data area', function (done) {
checkObjectExists(config, 'TESTDA', '*DTAARA', (error) => {
if (error) { throw error; }
done();
});
});
it('returns contents of a data area', function (done) {
const connection = new iConn(database, username, password, restOptions);
const connection = new iConn(database, username, password, restOptions);

const work = new iWork(connection);
const work = new iWork(connection);

work.getDataArea('NODETKTEST', 'TESTDA', 20, (output) => {
expect(output).to.be.an('Object');
expect(output).to.have.a.property('Type_of_value_returned');
expect(output).to.have.a.property('Library_name');
expect(output).to.have.a.property('Length_of_value_returned');
expect(output).to.have.a.property('Number_of_decimal_positions');
expect(output).to.have.a.property('Value');
done();
work.getDataArea('NODETKTEST', 'TESTDA', 20, (output) => {
expect(output).to.be.an('Object');
expect(output).to.have.a.property('Type_of_value_returned');
expect(output).to.have.a.property('Library_name');
expect(output).to.have.a.property('Length_of_value_returned');
expect(output).to.have.a.property('Number_of_decimal_positions');
expect(output).to.have.a.property('Value');
done();
});
});
});
});
Expand Down
33 changes: 15 additions & 18 deletions test/functional/iWorkFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,26 +192,23 @@ describe('iWork Functional Tests', function () {
});

describe('getDataArea', function () {
before('check if data area exists for tests', function (done) {
it('returns contents of a data area', function (done) {
checkObjectExists(config, 'TESTDA', '*DTAARA', (error) => {
if (error) { throw error; }
done();
});
});
it('returns contents of a data area', function (done) {
const connection = new Connection(config);

const work = new iWork(connection);

work.getDataArea('NODETKTEST', 'TESTDA', 20, (error, output) => {
expect(error).to.equal(null);
expect(output).to.be.an('Object');
expect(output).to.have.a.property('Type_of_value_returned');
expect(output).to.have.a.property('Library_name');
expect(output).to.have.a.property('Length_of_value_returned');
expect(output).to.have.a.property('Number_of_decimal_positions');
expect(output).to.have.a.property('Value');
done();
const connection = new Connection(config);

const work = new iWork(connection);

work.getDataArea('NODETKTEST', 'TESTDA', 20, (error2, output) => {
expect(error2).to.equal(null);
expect(output).to.be.an('Object');
expect(output).to.have.a.property('Type_of_value_returned');
expect(output).to.have.a.property('Library_name');
expect(output).to.have.a.property('Length_of_value_returned');
expect(output).to.have.a.property('Number_of_decimal_positions');
expect(output).to.have.a.property('Value');
done();
});
});
});
});
Expand Down