Skip to content

Commit 79d7e95

Browse files
committed
fix bad publish
1 parent fce6cae commit 79d7e95

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "graphql-sequelize",
3-
"version": "0.14.0",
3+
"version": "0.14.1",
44
"description": "GraphQL & Relay for MySQL & Postgres via Sequelize",
55
"main": "lib/index.js",
66
"options": {
77
"mocha": "--require scripts/mocha-bootload"
88
},
99
"scripts": {
10-
"prepublish": "npm run check",
10+
"prepublish": "npm run check && npm run build",
1111
"check": "npm run lint && npm run test-unit",
1212
"lint": "eslint src",
1313
"build": "rm -rf lib/* && babel src --ignore test --optional runtime --out-dir lib",

test/unit/attributeFields.test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ describe('attributeFields', function () {
3939
float: {
4040
type: Sequelize.FLOAT
4141
},
42+
decimal: {
43+
type: Sequelize.DECIMAL
44+
},
4245
enum: {
4346
type: Sequelize.ENUM('first', 'second')
4447
},
@@ -62,7 +65,7 @@ describe('attributeFields', function () {
6265
it('should return fields for a simple model', function () {
6366
var fields = attributeFields(Model);
6467

65-
expect(Object.keys(fields)).to.deep.equal(['id', 'email', 'firstName', 'lastName', 'float', 'enum', 'enumTwo', 'list', 'virtualInteger', 'virtualBoolean']);
68+
expect(Object.keys(fields)).to.deep.equal(['id', 'email', 'firstName', 'lastName', 'float', 'decimal', 'enum', 'enumTwo', 'list', 'virtualInteger', 'virtualBoolean']);
6669

6770
expect(fields.id.type).to.be.an.instanceOf(GraphQLNonNull);
6871
expect(fields.id.type.ofType).to.equal(GraphQLInt);
@@ -82,14 +85,16 @@ describe('attributeFields', function () {
8285

8386
expect(fields.float.type).to.equal(GraphQLFloat);
8487

88+
expect(fields.decimal.type).to.equal(GraphQLString);
89+
8590
expect(fields.virtualInteger.type).to.equal(GraphQLInt);
8691

8792
expect(fields.virtualBoolean.type).to.equal(GraphQLBoolean);
8893
});
8994

9095
it('should be possible to exclude fields', function () {
9196
var fields = attributeFields(Model, {
92-
exclude: ['id', 'email', 'float', 'enum', 'enumTwo', 'list', 'virtualInteger', 'virtualBoolean']
97+
exclude: ['id', 'email', 'float', 'decimal', 'enum', 'enumTwo', 'list', 'virtualInteger', 'virtualBoolean']
9398
});
9499

95100
expect(Object.keys(fields)).to.deep.equal(['firstName', 'lastName']);

0 commit comments

Comments
 (0)