Skip to content

Commit

Permalink
test: clarify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
3cp committed Apr 20, 2020
1 parent 15d7e3e commit ede39f4
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/lib/descriptor.spec.js
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 ede39f4

Please sign in to comment.