Skip to content

Commit

Permalink
Move examples from test folder to examples, remove useless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DryByte committed Mar 15, 2023
1 parent 88091ec commit 9b8e355
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 129 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Execute: `npm install https://github.com/DryByte/AoS.js`

## How to use
Check _test_ folder in the repository, in there you can check some examples. Remember to change `require("../src")` to `require("aos.js")`.
Check _examples_ folder in the repository, in there you can check some examples. Remember to change `require("../src")` to `require("aos.js")`.

## Getting the docs on web
#### Online docs:
Expand Down
2 changes: 1 addition & 1 deletion test/buildingBot.js → examples/buildingBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function sleep(ms) {
}

async function startBuilding() {
let image = await loadImage("./test/images_to_build/logo1.png");
let image = await loadImage("./examples/images_to_build/logo1.png");
let canvas = createCanvas(image.width, image.height);
let ctx = canvas.getContext("2d");
ctx.drawImage(image,0,0);
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions test/genMapImage.js → examples/genMapImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function createMap() {
}

const b = canvas.toBuffer('image/png');
fs.writeFileSync(`./test/maps/map_${Date.now()}.png`, b);
fs.writeFileSync(`./examples/maps/map_${Date.now()}.png`, b);
console.log(`Created map: ${Date.now()}`);
}

Expand Down Expand Up @@ -71,11 +71,11 @@ client.connect("aos://16777343:32887");
process.on('SIGINT', function() {
console.log("Cleaning maps directory...");

let maps = fs.readdirSync("./test/maps");
let maps = fs.readdirSync("./examples/maps");

for (let _map of maps) {
if(_map.endsWith(".png")) {
fs.unlinkSync(`./test/maps/${_map}`);
fs.unlinkSync(`./examples/maps/${_map}`);
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions test/clientConnection.js

This file was deleted.

89 changes: 0 additions & 89 deletions test/fullClientTest.js

This file was deleted.

19 changes: 0 additions & 19 deletions test/vxlTest.js

This file was deleted.

0 comments on commit 9b8e355

Please sign in to comment.