• Home
  • Books
  • Node
  • Testing
  • JavaScript
  • More...
  • Search
  • About
  • Gear & Setup

Sequelize

A collection of 4 posts

#node #javascript #Sequelize #productivity

Using ES6 classes for Sequelize 4 or 5 models

The ES2015 or ES6 specification introduced class to JavaScript. Libraries like React went from React.createClass to class MyComponent extends React.Component, ie went from rolling their own constructor to leveraging a language built-in to convey the programmer’s intent. For a Nod ...

  • Hugo Di Francesco
    Author
3 min read
#Sequelize #Express #javascript #node

Sequelize Data Types: a practical guide

DataTypes are core to the Sequelize 4 library. This is a practical and complete guide to make up for the sparse Sequelize official documentation on the subject. First of all, DataTypes contains both the types and generators for default values: eg. NOW, UUIDV1 and UUIDV4 are speci ...

  • Hugo Di Francesco
    Author
3 min read
#node #sequelize #git #cli #javascript

Progress and roadblocks: a journey into open-source

Enhancing generators for ES6 in the Sequelize CLI This is the story of my discovery of ES6-class style model definitions with Sequelize (see Using ES6 classes for Sequelize 4 models). The realisation that the current Sequelize CLI model generator didn’t support it (as is e ...

  • Hugo Di Francesco
    Author
6 min read
#node #jest #testing #javascript #Sequelize

Mocking/stubbing ES6 classes in tests with examples of Sequelize model unit tests

This post goes through some patterns that can be used to unit test ES6 classes. The examples will use Jest module auto-mocking but should be portable to other module mocking libraries (eg. Proxyquire) with some modifications. In “Using ES6 classes for Sequelize 4 models&rdq ...

  • Hugo Di Francesco
    Author
2 min read
Page 1 of 1 

Interested in Alpine.js?

Power up your debugging with the Alpine.js Devtools Extension for Chrome and Firefox. Trusted by over 15,000 developers (rated 4.5 ⭐️).

Install Now close
Code with Hugo
Latest Posts Github