Skip to content

Commit

Permalink
add test cases to command class and some ci fixes,lerna run version c…
Browse files Browse the repository at this point in the history
…ommand updates
  • Loading branch information
ninadhatkar committed May 5, 2021
1 parent 93e1835 commit 930ef55
Show file tree
Hide file tree
Showing 25 changed files with 5,635 additions and 191 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ lerna-debug.log
.DS_Store
contentTest
build
_backup*
_backup*
workspace.code-workspace
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript"
]
}
1 change: 1 addition & 0 deletions packages/auth/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage/*
Binary file not shown.
117 changes: 117 additions & 0 deletions packages/auth/package-lock.json

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

9 changes: 6 additions & 3 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"chai": "^4.2.0",
"eslint": "^5.16.0",
"eslint-config-oclif": "^3.1.0",
"eslint-config-oclif-typescript": "^0.2.0",
"globby": "^10.0.2",
"mocha": "^8.0.1",
"nyc": "^14.1.1",
Expand All @@ -37,7 +38,9 @@
],
"homepage": "https://github.com/contentstack/cli",
"keywords": [
"contentstack","cli", "plugin"
"contentstack",
"cli",
"plugin"
],
"license": "MIT",
"oclif": {
Expand All @@ -52,9 +55,9 @@
"scripts": {
"postpack": "rm -f oclif.manifest.json",
"posttest": "npx eslint .",
"prepack": "oclif-dev manifest && oclif-dev readme",
"prepack": "npx oclif-dev manifest && npx oclif-dev readme",
"test": "nyc mocha \"test/**/*.test.js\"",
"test-report": "nyc --reporter=html mocha \"test/**/*.test.js\"",
"version": "oclif-dev readme && git add README.md"
"version": "npx npx oclif-dev readme && git add README.md"
}
}
1 change: 1 addition & 0 deletions packages/auth/src/commands/auth/tokens/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class TokenIndex extends Command {
},
{
printLine: this.log,
// eslint-disable-next-line node/no-unsupported-features/es-syntax
...flags, // parsed flags
},
)
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/test/commands/tokens/add.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {test, expect} = require('@oclif/test')
const {test} = require('@oclif/test')
const {cli} = require('cli-ux')
const Configstore = require('configstore')
const config = new Configstore('contentstack_cli')
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('auth:tokens:add', () => {
assert.equal(managementTokens.token, 'authtokenblt123')
assert.equal(managementTokens.apiKey, 'blt1234')
assert.equal(managementTokens.type, 'management')
//expect(ctx.stdout).to.contain('"myalias" token replaced successfully!')
// expect(ctx.stdout).to.contain('"myalias" token replaced successfully!')
})

test
Expand Down
5 changes: 2 additions & 3 deletions packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@
"repository": "https://github.com/contentstack/cli",
"scripts": {
"postpack": "rm -f oclif.manifest.json",
"prepack": "oclif-dev manifest && oclif-dev readme",
"test": "nyc mocha --forbid-only \"test/**/*.test.js\"",
"prepack": "npx oclif-dev manifest && npx oclif-dev readme",
"posttest": "eslint .",
"version": "oclif-dev readme && git add README.md"
"version": "npx oclif-dev readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
"repository": "https://github.com/contentstack/cli",
"scripts": {
"test": "nyc --reporter=html mocha \"test/**/*.test.js\"",
"version": "oclif-dev readme && git add README.md"
"version": "npx oclif-dev readme && git add README.md"
}
}
1 change: 1 addition & 0 deletions packages/contentstack-command/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage/*
Loading

0 comments on commit 930ef55

Please sign in to comment.