Skip to content

Commit

Permalink
chore: blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Mar 4, 2019
1 parent b562748 commit dfdc9dd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $(() => {
let pos = getMousePos(canvas, e)
let posx = pos.x
let posy = pos.y

context.fillStyle = 'red'
context.beginPath()
context.arc(posx, posy, 5, 0, 2 * Math.PI)
Expand All @@ -31,6 +32,7 @@ $(() => {

function getMousePos (canvas, evt) {
let rect = canvas.getBoundingClientRect()

return {
x: evt.clientX - rect.left,
y: evt.clientY - rect.top,
Expand Down Expand Up @@ -82,6 +84,7 @@ $(() => {
// listen to input range for trigger command
$('.trigger-input-range').on('change', (e) => {
const $range = $(e.target)

$range.next('p').text($range.val())
})

Expand Down Expand Up @@ -179,6 +182,7 @@ $(() => {

$('.utility-jquery li').on('click', (e) => {
let $li = $(e.currentTarget)

$li.addClass('active')
})

Expand Down
3 changes: 3 additions & 0 deletions cypress/integration/examples/assertions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ context('Assertions', () => {
// We can use Chai's BDD style assertions
expect(true).to.be.true
const o = { foo: 'bar' }

expect(o).to.equal(o)
expect(o).to.deep.equal({ foo: 'bar' })
// matching text using regular expression
Expand Down Expand Up @@ -150,6 +151,7 @@ context('Assertions', () => {
.should(($div) => {
// we can massage text before comparing
const secondText = normalizeText($div.text())

expect(secondText, 'second text').to.equal(text)
})
})
Expand All @@ -159,6 +161,7 @@ context('Assertions', () => {
name: 'Joe',
age: 20,
}

assert.isObject(person, 'value is object')
})
})
Expand Down
1 change: 1 addition & 0 deletions cypress/integration/examples/network_requests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ context('Network Requests', () => {
// https://on.cypress.io/route

let message = 'whoa, this comment does not exist'

cy.server()

// Listen to GET to comments/1
Expand Down
3 changes: 3 additions & 0 deletions cypress/integration/examples/utilities.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ context('Utilities', () => {
.then((dataUrl) => {
// create an <img> element and set its src to the dataUrl
let img = Cypress.$('<img />', { src: dataUrl })

// need to explicitly return cy here since we are initially returning
// the Cypress.Blob.imgSrcToDataURL promise to our test
// append the image
Expand All @@ -49,6 +50,7 @@ context('Utilities', () => {
let matching = Cypress.minimatch('/users/1/comments', '/users/*/comments', {
matchBase: true,
})

expect(matching, 'matching wildcard').to.be.true

matching = Cypress.minimatch('/users/1/comments/2', '/users/*/comments', {
Expand All @@ -75,6 +77,7 @@ context('Utilities', () => {
// https://on.cypress.io/moment
// eslint-disable-next-line no-unused-vars
const time = Cypress.moment().utc('2014-04-25T19:38:53.196Z').format('h:mm A')

expect(time).to.be.a('string')

cy.get('.utility-moment').contains('3:38 PM')
Expand Down

0 comments on commit dfdc9dd

Please sign in to comment.