Passed
Branch master (2105e3)
by Rafael S.
01:29
created

test/read-bext.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 17
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 17
rs 10
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 0
1
/*!
2
 * Copyright (c) 2017 Rafael da Silva Rocha.
3
 * 
4
 */
5
6
let assert = require("assert");
7
8
describe("BWF data reading", function() {
9
10
    let fs = require("fs");
11
    let wavefile = require("../index.js");
12
    let path = "test/files/";
13
    
14
    let wBytes = fs.readFileSync(path + "24bit-16kHz-bext-mono.wav");
15
    let wav = new wavefile.WaveFile(wBytes);
16
    wav.fromBytes(wBytes);
17
18
    it("should find the 'bext' chunk in a BWF",
19
            function() {
20
        assert.equal(wav.bextChunkId, "bext");
21
    });
22
});
23