This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// rt | |
render(<$ELEMENT$ $ATTRIBUTE$='$TEXT$'/>).getByText(/$TEXT$/); | |
$END$ | |
// itrt | |
it('should render properly the $ATTRIBUTE$ value', () => { | |
render(<$ELEMENT$ $ATTRIBUTE$='$TEXT$'/>).getByText(/$TEXT$/); | |
}); | |
$END$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const mongoose = require('mongoose'); | |
const mongooseCrudify = require('mongoose-crudify'); | |
const app = express(); | |
const bodyParser = require('body-parser'); | |
const PORT = process.env.PORT || 3000; | |
mongoose.connect('mongodb://localhost/demo', {useNewUrlParser: true}) | |
.then(() => console.log('Connection successfull')) | |
.catch(err => console.error(err)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/demo', {useNewUrlParser: true}) | |
.then(() => console.log('Connection successfull')) | |
.catch(err => console.error(err)); | |
const BlogSchema = mongoose.Schema({ | |
name:String, | |
email:String, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given a array of array values, will return a new instance with a flatten array. | |
* | |
* @param {Array} The array which will be flatten | |
* @param {Array} The new flatten array (private) | |
* @param {number} A position index that use to traverse given array. (private) | |
* @return {Array} The new array flatten | |
* @public | |
*/ | |
function flatten(numbers, result, index) { |