Skip to content

Commit

Permalink
test: fix failing test and add test files, also updated standard to l…
Browse files Browse the repository at this point in the history
…asted due to issue in npm test cycle
  • Loading branch information
rxmarbles authored and wesleytodd committed Mar 14, 2024
1 parent ecb58b4 commit edeee00
Show file tree
Hide file tree
Showing 12 changed files with 2,043 additions and 673 deletions.
2,489 changes: 1,818 additions & 671 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/create-pkg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"fs-extra": "^8.0.1",
"fs-test-fixtures": "^0.1.3",
"mocha": "^6.2.2",
"standard": "^14.3.1",
"standard": "^17.1.0",
"standard-version": "^9.0.0"
},
"support": true
Expand Down
3 changes: 2 additions & 1 deletion packages/create-pkg/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ suite(pkg.name, () => {
cwd: fix.TMP,
push: false,
silent: true,
githubRepo: '__tmp'
githubRepo: '__tmp',
author: 'tmp'
}, barePrompt)
})
})
8 changes: 8 additions & 0 deletions packages/create-pkg/test/tmp/.github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Code of Conduct

This project as adopted the Contributor Covenant v1.4.1 as its Code of Conduct.
See here for the details:

https://www.contributor-covenant.org/version/1/4/code-of-conduct

To report or discuss issues you can email tmp or open a public issue on GitHub.
12 changes: 12 additions & 0 deletions packages/create-pkg/test/tmp/.github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

:+1::tada: Welcome, thanks for taking the time to contribute! :tada::+1:

[Code Of Conduct](./CODE_OF_CONDUCT.md)

All contributions are welcome; features, fixes, documentation or just helping
others solve their issues. The best way to get started is to look through
our Issues and Pull Requests. If you have questions feel free to open an Issue
and tag it with `question` so others can find it and help out!

Happy Hacking!
10 changes: 10 additions & 0 deletions packages/create-pkg/test/tmp/.github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Security Policy

## Supported Versions

This project supports security and feature development on the two most recent
major versions. It also supports all active and LTS Node.js release lines.

## Reporting a Vulnerability

To report a vulnerability email tmp before opening public issues on the repo.
20 changes: 20 additions & 0 deletions packages/create-pkg/test/tmp/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 13.x, 14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: npm it
130 changes: 130 additions & 0 deletions packages/create-pkg/test/tmp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# default
package-lock.json

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
1 change: 1 addition & 0 deletions packages/create-pkg/test/tmp/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
13 changes: 13 additions & 0 deletions packages/create-pkg/test/tmp/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2024, tmp

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 changes: 17 additions & 0 deletions packages/create-pkg/test/tmp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "tmp",
"version": "0.0.0",
"description": "",
"main": "index.js",
"type": "commonjs",
"keywords": [],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "tmp",
"license": "ISC",
"devDependencies": {
"mocha": "^10.3.0",
"standard": "^17.1.0"
}
}
11 changes: 11 additions & 0 deletions packages/create-pkg/test/tmp/test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict'
const { suite, test } = require('mocha')
const assert = require('assert')
const pkg = require('../package.json')
const mod = require('..')

suite(pkg.name, () => {
test('...', () => {
assert(mod)
})
})

0 comments on commit edeee00

Please sign in to comment.