Skip to content

Commit

Permalink
test: clarify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
3cp committed Jan 9, 2020
1 parent 579425e commit ceb5e52
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/lib/descriptor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ describe('FileDescriptor', function() {
assert.isTrue(fd.isAppend());
});

it('not opened for appending (O_CREAT)', function() {
const fd = new FileDescriptor(constants.O_CREAT);
it('not opened for appending (O_CREAT | O_RDONLY)', function() {
const fd = new FileDescriptor(constants.O_CREAT | constants.O_RDONLY);
assert.isFalse(fd.isAppend());
});
});
Expand Down Expand Up @@ -158,8 +158,8 @@ describe('FileDescriptor', function() {
assert.isFalse(fd.isTruncate());
});

it('not opened for truncating (O_CREAT)', function() {
const fd = new FileDescriptor(constants.O_CREAT);
it('not opened for truncating (O_CREAT | O_RDONLY)', function() {
const fd = new FileDescriptor(constants.O_CREAT | constants.O_RDONLY);
assert.isFalse(fd.isTruncate());
});
});
Expand Down Expand Up @@ -225,8 +225,8 @@ describe('FileDescriptor', function() {
assert.isTrue(fd.isCreate());
});

it('opened for creation (O_CREAT)', function() {
const fd = new FileDescriptor(constants.O_CREAT);
it('opened for creation (O_CREAT | O_RDONLY)', function() {
const fd = new FileDescriptor(constants.O_CREAT | constants.O_RDONLY);
assert.isTrue(fd.isCreate());
});
});
Expand Down Expand Up @@ -292,8 +292,8 @@ describe('FileDescriptor', function() {
assert.isTrue(fd.isRead());
});

it('opened for reading (O_CREAT)', function() {
const fd = new FileDescriptor(constants.O_CREAT);
it('opened for reading (O_CREAT | O_RDONLY)', function() {
const fd = new FileDescriptor(constants.O_CREAT | constants.O_RDONLY);
assert.isTrue(fd.isRead());
});
});
Expand Down Expand Up @@ -359,8 +359,8 @@ describe('FileDescriptor', function() {
assert.isTrue(fd.isWrite());
});

it('not opened for writing (O_CREAT)', function() {
const fd = new FileDescriptor(constants.O_CREAT);
it('not opened for writing (O_CREAT | O_RDONLY)', function() {
const fd = new FileDescriptor(constants.O_CREAT | constants.O_RDONLY);
assert.isFalse(fd.isWrite());
});
});
Expand Down Expand Up @@ -426,8 +426,8 @@ describe('FileDescriptor', function() {
assert.isTrue(fd.isExclusive());
});

it('not opened for exclusive (O_CREAT)', function() {
const fd = new FileDescriptor(constants.O_CREAT);
it('not opened for exclusive (O_CREAT | O_RDONLY)', function() {
const fd = new FileDescriptor(constants.O_CREAT | constants.O_RDONLY);
assert.isFalse(fd.isExclusive());
});
});
Expand Down

0 comments on commit ceb5e52

Please sign in to comment.