tests for weather class
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { assert, describe, expect, it } from 'vitest'
|
||||
import path from 'path';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { voiceLines, LINES } from '../src/voice.js';
|
||||
import type { Voice } from '../src/voice.js';
|
||||
|
||||
@@ -113,4 +114,16 @@ describe('voiceLines', () => {
|
||||
expect(voiceLines(dummyVoice, NaN)).length.to.be.empty;
|
||||
expect(voiceLines(dummyVoice, 1e21)).length.to.be.empty;
|
||||
});
|
||||
|
||||
it('returns the results as paths when voice configuration is provided', () => {
|
||||
const directory = path.join('audio', 'voice', 'someone');
|
||||
const v: Voice = {
|
||||
directory,
|
||||
extension: 'flac'
|
||||
}
|
||||
expect(voiceLines(v, 29)).to.include.ordered.members([
|
||||
path.join(directory, `twenty.flac`),
|
||||
path.join(directory, `nine.flac`),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user