update .prettierignore

This commit is contained in:
Harvey Zack committed 2022-11-04 23:05:13 +08:00
1 parent 463884b50a
commit 7912559c17
5 files changed
+759 -765

No files matched your search

-4
View File
@@ -2,11 +2,7 @@ node_modules
.docusaurus
.parcel-cache
.github
*.log
*.lock
test
docs
scripts
packages/*/dist
packages/*/node_modules
packages/*/.parcel-cache
+5 -5
View File
@@ -1,19 +1,19 @@
describe('Constructor', function() {
describe('Constructor', function () {
var url = './assets/sample/video.mp4';
afterEach(function() {
[...Artplayer.instances].forEach(art => {
afterEach(function () {
[...Artplayer.instances].forEach((art) => {
art.destroy(true);
});
});
it('Constructor is a global variable', function() {
it('Constructor is a global variable', function () {
expect(Artplayer).to.be.an('function');
expect(Artplayer.instances).to.be.an('array');
expect(Artplayer.instances.length).to.be.equal(0);
});
it('Instance state', function() {
it('Instance state', function () {
var sample1 = new Artplayer({ container: '.sample1', url: url });
expect(sample1.id).to.equal(1);
var sample2 = new Artplayer({ container: '.sample2', url: url });
+742 -742
View File
File diff suppressed because it is too large. Load diff
+5 -7
View File
@@ -1,6 +1,5 @@
<html>
<head>
<head>
<meta charset="utf-8" />
<title>Mocha Tests</title>
<link href="../node_modules/mocha/mocha.css" rel="stylesheet" />
@@ -13,7 +12,7 @@
border-bottom: 1px solid #999;
}
.artplayer-app>div {
.artplayer-app > div {
display: flex;
justify-content: center;
align-items: center;
@@ -22,9 +21,9 @@
border-right: 1px solid #999;
}
</style>
</head>
</head>
<body>
<body>
<div class="artplayer-app">
<div class="sample1">sample1</div>
<div class="sample2">sample2</div>
@@ -47,6 +46,5 @@
mocha.checkLeaks();
mocha.run();
</script>
</body>
</body>
</html>
+7 -7
View File
@@ -1,21 +1,21 @@
describe('Option', function() {
describe('Option', function () {
var url = './assets/sample/video.mp4';
afterEach(function() {
[...Artplayer.instances].forEach(art => {
afterEach(function () {
[...Artplayer.instances].forEach((art) => {
art.destroy(true);
});
});
it('Throw error when multiple instances on the same dom element', function() {
expect(function() {
it('Throw error when multiple instances on the same dom element', function () {
expect(function () {
new Artplayer({ container: '.sample1', url: url });
new Artplayer({ container: '.sample1', url: url });
}).to.throw(/Cannot mount multiple instances on the same dom element/);
});
it('Throw error when container is not a dom element or selector', function() {
expect(function() {
it('Throw error when container is not a dom element or selector', function () {
expect(function () {
new Artplayer({
container: null,
url: url,