Skip to content

Commit

Permalink
adds back media optim tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Aug 18, 2021
1 parent 8ac4b60 commit bacc0e6
Showing 1 changed file with 7 additions and 7 deletions.
@@ -1,5 +1,5 @@
import UppyMediaOptimization from "discourse/lib/uppy-media-optimization-plugin";
import { module, skip } from "qunit";
import { module, test } from "qunit";
import { Promise } from "rsvp";

class FakeUppy {
Expand Down Expand Up @@ -34,7 +34,7 @@ class FakeUppy {
}

module("Unit | Utility | UppyMediaOptimization Plugin", function () {
skip("sets the options passed in", function (assert) {
test("sets the options passed in", function (assert) {
const fakeUppy = new FakeUppy();
const plugin = new UppyMediaOptimization(fakeUppy, {
id: "test-uppy",
Expand All @@ -48,7 +48,7 @@ module("Unit | Utility | UppyMediaOptimization Plugin", function () {
assert.equal(plugin.optimizeFn(), "wow such optimized");
});

skip("installation uses the correct function", function (assert) {
test("installation uses the correct function", function (assert) {
const fakeUppy = new FakeUppy();
const plugin = new UppyMediaOptimization(fakeUppy, {
id: "test-uppy",
Expand All @@ -68,7 +68,7 @@ module("Unit | Utility | UppyMediaOptimization Plugin", function () {
assert.equal(plugin.uppy.preprocessors[0](), "using serial");
});

skip("sets the file state when successfully optimizing the file and emits events", function (assert) {
test("sets the file state when successfully optimizing the file and emits events", function (assert) {
const fakeUppy = new FakeUppy();
const plugin = new UppyMediaOptimization(fakeUppy, {
id: "test-uppy",
Expand All @@ -90,7 +90,7 @@ module("Unit | Utility | UppyMediaOptimization Plugin", function () {
});
});

skip("handles optimizer errors gracefully by leaving old file state and calling preprocess-complete", function (assert) {
test("handles optimizer errors gracefully by leaving old file state and calling preprocess-complete", function (assert) {
const fakeUppy = new FakeUppy();
const plugin = new UppyMediaOptimization(fakeUppy, {
id: "test-uppy",
Expand All @@ -114,7 +114,7 @@ module("Unit | Utility | UppyMediaOptimization Plugin", function () {
});
});

skip("handles serial file optimization successfully", function (assert) {
test("handles serial file optimization successfully", function (assert) {
const fakeUppy = new FakeUppy();
const plugin = new UppyMediaOptimization(fakeUppy, {
id: "test-uppy",
Expand All @@ -141,7 +141,7 @@ module("Unit | Utility | UppyMediaOptimization Plugin", function () {
});
});

skip("handles parallel file optimization successfully", function (assert) {
test("handles parallel file optimization successfully", function (assert) {
const fakeUppy = new FakeUppy();
const plugin = new UppyMediaOptimization(fakeUppy, {
id: "test-uppy",
Expand Down

0 comments on commit bacc0e6

Please sign in to comment.