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
+2609 -2615

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 });
+2550 -2550
View File
File diff suppressed because it is too large. Load diff
+47 -49
View File
@@ -1,52 +1,50 @@
<html>
<head>
<meta charset="utf-8" />
<title>Mocha Tests</title>
<link href="../node_modules/mocha/mocha.css" rel="stylesheet" />
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<style>
.artplayer-app {
display: flex;
height: 300px;
border-bottom: 1px solid #999;
}
<head>
<meta charset="utf-8" />
<title>Mocha Tests</title>
<link href="../node_modules/mocha/mocha.css" rel="stylesheet" />
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<style>
.artplayer-app {
display: flex;
height: 300px;
border-bottom: 1px solid #999;
}
.artplayer-app > div {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
padding: 10px;
border-right: 1px solid #999;
}
</style>
</head>
.artplayer-app>div {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
padding: 10px;
border-right: 1px solid #999;
}
</style>
</head>
<body>
<div class="artplayer-app">
<div class="sample1">sample1</div>
<div class="sample2">sample2</div>
<div class="sample3">sample3</div>
</div>
<div id="mocha"></div>
<script>
window.mocha.setup('bdd');
window.expect = window.chai.expect;
</script>
<script src="../packages/artplayer/dist/artplayer.js"></script>
<script src="../packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js"></script>
<script src="../packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js"></script>
<script src="../packages/artplayer-plugin-iframe/dist/artplayer-helper-iframe.js"></script>
<!-- Test start -->
<script src="./document.test.js"></script>
<script src="./option.test.js"></script>
<!-- Test end -->
<script>
mocha.checkLeaks();
mocha.run();
</script>
</body>
</html>
<body>
<div class="artplayer-app">
<div class="sample1">sample1</div>
<div class="sample2">sample2</div>
<div class="sample3">sample3</div>
</div>
<div id="mocha"></div>
<script>
window.mocha.setup('bdd');
window.expect = window.chai.expect;
</script>
<script src="../packages/artplayer/dist/artplayer.js"></script>
<script src="../packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js"></script>
<script src="../packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js"></script>
<script src="../packages/artplayer-plugin-iframe/dist/artplayer-helper-iframe.js"></script>
<!-- Test start -->
<script src="./document.test.js"></script>
<script src="./option.test.js"></script>
<!-- Test end -->
<script>
mocha.checkLeaks();
mocha.run();
</script>
</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,