-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: move test helpers from samples into core #5969
Changes from all commits
99af064
eff84af
e276745
fb57f18
3a655c5
0ded768
08cddc8
6d47b07
8a78f68
e084e91
ccfd888
e1ad627
0766370
b332bdf
e2dd397
a72953c
acb3e3b
39db79b
9c13a36
0e39153
1f8eb8f
220d7bb
4dac25a
050956d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
{ | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"mocha": true | ||
}, | ||
"globals": { | ||
"chai": false, | ||
"sinon": false, | ||
"testHelpers": true | ||
"sinon": false | ||
}, | ||
"rules": { | ||
"no-unused-vars": ["off"], | ||
// Allow uncommented helper functions in tests. | ||
"require-jsdoc": ["off"], | ||
"prefer-rest-params": ["off"] | ||
"prefer-rest-params": ["off"], | ||
"no-invalid-this": ["off"] | ||
}, | ||
"extends": "../../.eslintrc.json" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,11 @@ | |
goog.module('Blockly.test.astNode'); | ||
|
||
const {ASTNode} = goog.require('Blockly.ASTNode'); | ||
const {sharedTestSetup, sharedTestTeardown, workspaceTeardown} = goog.require('Blockly.test.helpers'); | ||
const {sharedTestSetup, sharedTestTeardown, workspaceTeardown} = goog.require('Blockly.test.helpers.setupTeardown'); | ||
|
||
|
||
suite('ASTNode', function() { | ||
console.log('1/a'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this debugging that got committed by accident? (Here and several places below). |
||
setup(function() { | ||
sharedTestSetup.call(this); | ||
Blockly.defineBlocksWithJsonArray([{ | ||
|
@@ -100,7 +101,9 @@ suite('ASTNode', function() { | |
}); | ||
|
||
suite('HelperFunctions', function() { | ||
console.log('2'); | ||
test('findNextForInput_', function() { | ||
console.log('3'); | ||
const input = this.blocks.statementInput1.inputList[0]; | ||
const input2 = this.blocks.statementInput1.inputList[1]; | ||
const connection = input.connection; | ||
|
@@ -169,6 +172,7 @@ suite('ASTNode', function() { | |
}); | ||
|
||
suite('NavigationFunctions', function() { | ||
console.log('b'); | ||
setup(function() { | ||
Blockly.defineBlocksWithJsonArray([{ | ||
"type": "top_connection", | ||
|
@@ -319,7 +323,9 @@ suite('ASTNode', function() { | |
workspaceTeardown.call(this, this.singleBlockWorkspace); | ||
}); | ||
|
||
console.log('c'); | ||
test('fromPreviousToBlock', function() { | ||
console.log('d'); | ||
const prevConnection = this.blocks.statementInput1.previousConnection; | ||
const node = ASTNode.createConnectionNode(prevConnection); | ||
const nextNode = node.next(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably much better to turn this off only where it is necessary. See e.g.
core/utils/global.js
.