Skip to content

Commit

Permalink
Build using local arunty
Browse files Browse the repository at this point in the history
  • Loading branch information
phocks committed Dec 5, 2023
1 parent da12ea0 commit 3b2be79
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 6 deletions.
224 changes: 224 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"yeoman-generator": "^5.2.0"
},
"devDependencies": {
"@types/jest": "^29.5.10",
"babel-eslint": "^10.1.0",
"eslint": "^7.7.0",
"eslint-config-prettier": "^8.2.0",
Expand Down
27 changes: 21 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { _testBuild } = require('../src/cli/build');
const { _testGenerate } = require('../src/cli/generate');
const path = require('path');
const fs = require('fs/promises');
const mem = require('mem');
const { execSync } = require('child_process');
const { getBuildConfig } = require('../src/config/build');
const { getBabelConfig } = require('../src/config/babel');
const { getProjectConfig } = require('../src/config/project');
Expand Down Expand Up @@ -63,11 +63,22 @@ afterAll(async () => {
await rmRecursive(tempRoot);
});

['basic', 'react', 'preact', 'svelte'].forEach(template => {
[
'basic'
// 'react',
// 'preact',
// 'svelte'
].forEach(template => {
describe(`${template} project`, () => {
[true, false].forEach(hasTypescript => {
[
true
// false
].forEach(hasTypescript => {
describe(hasTypescript ? 'with typescript' : 'without typescript', () => {
[false, true].forEach(hasOdyssey => {
[
false
// true
].forEach(hasOdyssey => {
describe(hasOdyssey ? 'with odyssey' : 'without odyssey', () => {
const projectName = [
'project',
Expand Down Expand Up @@ -109,8 +120,12 @@ afterAll(async () => {
it('should build the generated project', async () => {
process.chdir(generatedProjectRoot);

// If the build fails for any reason this will throw.
await _testBuild(argv);
try {
let output = execSync('npx aunty build');
console.log(output.toString());
} catch (error) {
console.error(error.stdout.toString());
}

const fileList = await fs.readdir(path.join(generatedProjectRoot, '.aunty/build'));

Expand Down

0 comments on commit 3b2be79

Please sign in to comment.