Skip to content

Instantly share code, notes, and snippets.

View nottyo's full-sized avatar

Traitanit Huangsri nottyo

View GitHub Profile
@nottyo
nottyo / app.py
Created July 7, 2018 09:11
app.py
import os, re, json
from datetime import datetime, date, timedelta
from flask import Flask, request, abort
import requests
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.exceptions import (
InvalidSignatureError
)
@nottyo
nottyo / package.json
Last active July 25, 2020 07:56
cypress-package.json
{
"name": "cypress-demo",
"version": "1.0.0",
"description": "cypress-demo",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Traitanit",
"license": "ISC",
@nottyo
nottyo / cypress_sample.spec.js
Created October 29, 2018 03:32
cypress_sample.spec.js
/// <reference types="Cypress" />
describe('Cypress Test', () => {
beforeEach(() => {
cy.visit('https://www.cypress.io')
})
it('should has text \'npm install cypress\'', () => {
cy.get('[class="filler"]').should('contain', 'npm install cypress')
})
@nottyo
nottyo / .babelrc
Created July 6, 2019 08:49
babelrc for istanbul
{
"plugins": ["istanbul"]
}
@nottyo
nottyo / .nycrc
Created July 6, 2019 08:50
nycrc configuration for code coverage
{
"extension": [".js", ".vue"]
}
/// <reference types="Cypress" />
describe('Add Todo', () => {
beforeEach(() => {
cy.visit(Cypress.config('baseUrl'))
})
it('should be able to add new todo', () => {
const firstTodo = 'Writing a blog'
const secondTodo = 'Running'
@nottyo
nottyo / index.js
Created July 6, 2019 09:16
cypress/support/index.js
import '@cypress/code-coverage/support'
@nottyo
nottyo / index.js
Created July 6, 2019 09:17
cypress/plugins/index.js
module.exports = (on, config) => {
on('task', require('@cypress/code-coverage/task'))
}
@nottyo
nottyo / cypress.json
Created July 14, 2019 13:41
cypress.reporter.json
{
"reporter": "spec"
}
@nottyo
nottyo / cypress.json
Created July 14, 2019 13:42
cypress.reporter.dot.json
{
"reporter": "dot"
}