Skip to content

Commit

Permalink
Merge pull request #10 from richytong/ci-lint
Browse files Browse the repository at this point in the history
CI runs lint
  • Loading branch information
jremi authored Jun 10, 2023
2 parents ed610d5 + 92237e9 commit aa77f2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i && npm test
- run: npm i && npm test && npm run lint
8 changes: 7 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ const readline = require('readline');
const TwilioMediaStreamSaveAudioFile = require('.');

describe('TwilioMediaStreamSaveAudioFile', () => {
const outputFilename = "my-twilio-media-stream-output";

before(async () => {
await fs.promises.unlink(`${__dirname}/${outputFilename}`).catch(() => {});
})

it('saves a twilio media stream to a local audio file in wav format', async () => {
const rl = readline.createInterface({
input: fs.createReadStream(`${__dirname}/fixtures/hello-world.txt`),
});

const mediaStreamSaver = new TwilioMediaStreamSaveAudioFile({
saveLocation: __dirname,
saveFilename: "my-twilio-media-stream-output",
saveFilename: outputFilename,
onSaved: () => console.log("File was saved!"),
});

Expand Down

0 comments on commit aa77f2f

Please sign in to comment.