Skip to content

Commit

Permalink
chore: specify coffee fixtures / convert others (#9433)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane authored Dec 4, 2020
1 parent c42667e commit 0243c4d
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions packages/server/__snapshots__/6_uncaught_support_file_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ exports['e2e uncaught support file errors failing 1'] = `
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 1.2.3 │
│ Browser: FooBrowser 88 │
│ Specs: 1 found (spec.coffee)
│ Specs: 1 found (spec.js)
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: spec.coffee (1 of 1)
Running: spec.js (1 of 1)
1) An uncaught error was detected outside of a test
Expand Down Expand Up @@ -47,20 +47,20 @@ We dynamically generated a new test to display this failure.
│ Screenshots: 1 │
│ Video: true │
│ Duration: X seconds │
│ Spec Ran: spec.coffee
│ Spec Ran: spec.js
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Screenshots)
- /XXX/XXX/XXX/cypress/screenshots/spec.coffee/An uncaught error was detected outs (YxX)
ide of a test (failed).png
- /XXX/XXX/XXX/cypress/screenshots/spec.js/An uncaught error was detected outside (YxX)
of a test (failed).png
(Video)
- Started processing: Compressing to 32 CRF
- Finished processing: /XXX/XXX/XXX/cypress/videos/spec.coffee.mp4 (X second)
- Finished processing: /XXX/XXX/XXX/cypress/videos/spec.js.mp4 (X second)
====================================================================================================
Expand All @@ -70,7 +70,7 @@ We dynamically generated a new test to display this failure.
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✖ spec.coffee XX:XX 1 - 1 - - │
│ ✖ spec.js XX:XX 1 - 1 - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✖ 1 of 1 failed (100%) XX:XX 1 - 1 - -
Expand Down
4 changes: 2 additions & 2 deletions packages/server/lib/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,9 @@ class Project extends EE {
// example:
//
// /Users/bmann/Dev/cypress-app/.projects/cypress/integration
// /Users/bmann/Dev/cypress-app/.projects/cypress/integration/foo.coffee
// /Users/bmann/Dev/cypress-app/.projects/cypress/integration/foo.js
//
// becomes /integration/foo.coffee
// becomes /integration/foo.js

const folderToUse = type === 'integration' ? integrationFolder : componentFolder

Expand Down
6 changes: 3 additions & 3 deletions packages/server/lib/util/specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ function findSpecsOfType (searchOptions, specPattern) {
}

// example of resolved paths in the returned spec object
// filePath = /Users/bmann/Dev/my-project/cypress/integration/foo.coffee
// filePath = /Users/bmann/Dev/my-project/cypress/integration/foo.js
// integrationFolderPath = /Users/bmann/Dev/my-project/cypress/integration
// relativePathFromSearchFolder = foo.coffee
// relativePathFromProjectRoot = cypress/integration/foo.coffee
// relativePathFromSearchFolder = foo.js
// relativePathFromProjectRoot = cypress/integration/foo.js

const relativePathFromSearchFolder = (file) => {
return path.relative(searchFolderPath, file)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it('foo', () => { })
12 changes: 6 additions & 6 deletions packages/server/test/unit/fixture_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,17 @@ ParseError: Unterminated string constant\

context('coffee files', () => {
it('returns valid coffee object', function () {
return fixture.get(this.fixturesFolder, 'account.coffee').then((account) => {
expect(account).to.deep.eq({
return fixture.get(this.fixturesFolder, 'valid_coffee_obj.coffee').then((coffeeObj) => {
expect(coffeeObj).to.deep.eq({
name: 'cypress',
users: [],
})
})
})

it('does not rewrite coffee files', function () {
return fixture.get(this.fixturesFolder, 'no_format.coffee').then(() => {
return fs.readFileAsync(`${this.fixturesFolder}/no_format.coffee`, 'utf8').then((str) => {
return fixture.get(this.fixturesFolder, 'no_format_coffee.coffee').then(() => {
return fs.readFileAsync(`${this.fixturesFolder}/no_format_coffee.coffee`, 'utf8').then((str) => {
expect(str).to.eq(`\
[
{id: 1}
Expand Down Expand Up @@ -453,8 +453,8 @@ John,Chef,1982
})

it('does not remove trailing new lines on .coffee', function () {
return fixture.get(this.fixturesFolder, 'trailing_new_line.coffee').then((str) => {
return fs.readFileAsync(`${this.fixturesFolder}/trailing_new_line.coffee`, 'utf8').then((str2) => {
return fixture.get(this.fixturesFolder, 'trailing_new_line_coffee.coffee').then((str) => {
return fs.readFileAsync(`${this.fixturesFolder}/trailing_new_line_coffee.coffee`, 'utf8').then((str2) => {
expect(str2).to.eq('{ foo: "bar" }\n')
})
})
Expand Down
4 changes: 2 additions & 2 deletions packages/server/test/unit/socket_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,8 @@ describe('lib/socket', () => {
})

it('calls statAsync on .coffee file', function () {
return this.socket.onTestFileChange('foo/bar.coffee').then(() => {
expect(fs.statAsync).to.be.calledWith('foo/bar.coffee')
return this.socket.onTestFileChange('foo/bar_coffee.coffee').then(() => {
expect(fs.statAsync).to.be.calledWith('foo/bar_coffee.coffee')
})
})

Expand Down

2 comments on commit 0243c4d

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0243c4d Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.1.0/circle-develop-0243c4db481dabec22a2a8ea8a0ca15a0f6b5b93/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0243c4d Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.1.0/circle-develop-0243c4db481dabec22a2a8ea8a0ca15a0f6b5b93/cypress.tgz

Please sign in to comment.