@lexho111/plainblog 0.5.18 → 0.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/styles.min.css +2 -0
- package/test/model.test.js +9 -1
- package/test/server.test.js +2 -2
package/package.json
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
body{font-family:Arial;font-family:Arial,sans-serif}h1{color:#333}.grid{border:0 solid #000;display:grid;gap:.25rem;grid-template-columns:1fr}.grid article{border:0 solid #ccc;border-radius:4px;min-width:0;overflow-wrap:break-word;padding:.25rem}.grid article h2{color:#353535;margin-bottom:5px}.grid article .datetime{color:#757575;margin:0}.grid article p{margin-bottom:0;margin-top:10px}article a,article a:visited,h1{color:#696969}nav a{color:#3b40c1;font-size:20px;text-decoration:underline}nav a:visited{color:#3b40c1;text-decoration-color:#3b40c1}#wrapper{max-width:500px;width:100%}@media screen and (max-width:1000px){*{font-size:4vw}#wrapper{box-sizing:border-box;max-width:100%;padding:0 10px;width:100%}}
|
|
2
|
+
/* source-hash: a07f631befba4b6bc703f8709f5ef455faafeff4e5f00b62f835576eea7fb529 */
|
package/test/model.test.js
CHANGED
|
@@ -3,6 +3,7 @@ import Article from "../Article.js";
|
|
|
3
3
|
import { fetchData, postData } from "../model/APIModel.js";
|
|
4
4
|
import { server } from "./simpleServer.js";
|
|
5
5
|
import fs from "fs";
|
|
6
|
+
import { execSync } from "child_process";
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
saveInfo,
|
|
@@ -28,12 +29,19 @@ function generateRandomContent(length) {
|
|
|
28
29
|
|
|
29
30
|
describe("API Model test", () => {
|
|
30
31
|
beforeAll((done) => {
|
|
32
|
+
try {
|
|
33
|
+
execSync("npm install postcss autoprefixer cssnano --no-save", {
|
|
34
|
+
stdio: "ignore",
|
|
35
|
+
});
|
|
36
|
+
} catch (e) {
|
|
37
|
+
console.log("Error installing dependencies: " + e);
|
|
38
|
+
}
|
|
31
39
|
const port = 8081;
|
|
32
40
|
server.listen(port, () => {
|
|
33
41
|
console.log(`Simple server running at http://localhost:${port}/`);
|
|
34
42
|
done();
|
|
35
43
|
});
|
|
36
|
-
});
|
|
44
|
+
}, 80000);
|
|
37
45
|
afterAll(() => {
|
|
38
46
|
return new Promise((done) => {
|
|
39
47
|
server.close(done);
|
package/test/server.test.js
CHANGED
|
@@ -22,9 +22,9 @@ describe("server test", () => {
|
|
|
22
22
|
beforeAll(async () => {
|
|
23
23
|
//blog.database.type = "sqlite";
|
|
24
24
|
blog.database.dbname = "test_server_db";
|
|
25
|
-
blog.setStyle(
|
|
25
|
+
/*blog.setStyle(
|
|
26
26
|
"body { font-family: Arial, sans-serif; } h1 { color: #333; }"
|
|
27
|
-
)
|
|
27
|
+
);*/
|
|
28
28
|
await blog.init();
|
|
29
29
|
// Await it to ensure the server is running before tests start.
|
|
30
30
|
await blog.startServer(PORT);
|