Skip to content

Commit

Permalink
Merge pull request #7 from nealwp/updates/v1.1
Browse files Browse the repository at this point in the history
Updates/v1.1
  • Loading branch information
nealwp authored May 19, 2023
2 parents 222c361 + 2347835 commit 2015504
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smodg",
"version": "1.1.1",
"version": "1.1.2",
"description": "Generate basic Sequelize models from TypeScript declaration files",
"main": "index.js",
"bin": {
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import minimist from 'minimist';
import { generateModelInputs } from './parser';
import { modelTemplate, migrationTemplate } from './templates';
import { kebabCase } from './formatters';
import { version } from '../package.json'

const version = "1.1.2"

export const main = (args: minimist.ParsedArgs) => {

Expand Down
6 changes: 3 additions & 3 deletions tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('cli', () => {
test('should print the current app version', () => {
console.log = jest.fn()
printVersion()
expect(console.log).toHaveBeenCalledWith('smodg v1.2.3')
expect(console.log).toHaveBeenCalledWith('smodg v1.1.2')
})
})
describe('printHelp', () => {
Expand Down Expand Up @@ -109,14 +109,14 @@ describe('cli', () => {
// smodg -v
args = {_: [], v: true}
main(args)
expect(console.log).toHaveBeenCalledWith('smodg v1.2.3')
expect(console.log).toHaveBeenCalledWith('smodg v1.1.2')

jest.resetAllMocks()

// smodg --version
args = {_: [], version: true}
main(args)
expect(console.log).toHaveBeenCalledWith('smodg v1.2.3')
expect(console.log).toHaveBeenCalledWith('smodg v1.1.2')

})

Expand Down

0 comments on commit 2015504

Please sign in to comment.