Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MapRecorderWin unit tests #406

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('maprecorder/MapRecorderWin.vue', () => {
expect(vm.error).to.equal(false);
// Supported codecs under chrome.
expect(vm.mimeType).to.equal('video/webm');
expect(vm.mimeTypes.length).to.equal(2);
expect(vm.mimeTypes.length).to.equal(3);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering whether this line should stay or be completely removed... the test is about default values... from a point of view, it is assigned when building the data object but on the other, it's value is computed and dependent of the browser the test is running on... so is it really a default value ?

I let you take the decision...

Suggested change
expect(vm.mimeTypes.length).to.equal(3);

});

afterEach(() => {
Expand All @@ -65,9 +65,10 @@ describe('maprecorder/MapRecorderWin.vue', () => {

it('correct supported mime types under chrome', () => {
const mimeTypes = vm.getSupportedMimeTypes();
expect(mimeTypes.length).to.equal(2);
expect(mimeTypes.length).to.equal(3);
expect(mimeTypes[0]).to.equal('video/webm');
expect(mimeTypes[1]).to.equal('video/x-matroska');
expect(mimeTypes[1]).to.equal('video/mp4');
expect(mimeTypes[2]).to.equal('video/x-matroska');
});

it('start / stop recording sets correct states', () => {
Expand Down
Loading