-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3978 from Automattic/update/move-spectrum-related…
…-tests Tests: Move Spectrum related tests to single test runner
- Loading branch information
Showing
19 changed files
with
187 additions
and
206 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
25 changes: 16 additions & 9 deletions
25
client/lib/cart-values/test/test.js → client/lib/cart-values/test/index.js
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
14 changes: 5 additions & 9 deletions
14
...lib/network-connection/test/index-test.js → client/lib/network-connection/test/index.js
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import assert from 'assert'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import useFakeDom from 'test/helpers/use-fake-dom'; | ||
import useFilesystemMocks from 'test/helpers/use-filesystem-mocks'; | ||
|
||
describe( 'PlansList', function() { | ||
const plansMockedData = require( './data/index.json' ); | ||
let PlansList; | ||
|
||
useFakeDom(); | ||
useFilesystemMocks( __dirname ); | ||
|
||
before( () => { | ||
PlansList = require( 'lib/plans-list' ) | ||
} ); | ||
|
||
describe( 'initialize', function() { | ||
it( 'should populate the list of plans', function() { | ||
const plansList = PlansList(); | ||
|
||
plansList.initialize( plansMockedData ); | ||
|
||
assert.strictEqual( plansList.get().length, plansMockedData.length ); | ||
} ); | ||
|
||
it( 'should set attributes properly', function() { | ||
const plansList = PlansList(); | ||
|
||
plansList.initialize( plansMockedData ); | ||
|
||
const premiumPlan = plansList.get().filter( function( plan ) { | ||
return plan.product_id === 1003; | ||
} ); | ||
|
||
for ( let prop in premiumPlan ) { | ||
assert.strictEqual( premiumPlan[ prop ], plansMockedData[ prop ] ); | ||
} | ||
} ); | ||
} ); | ||
} ); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.