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