How to use tests method in storybook-root

Best JavaScript code snippet using storybook-root

gtest_shuffle_test.py

Source:gtest_shuffle_test.py Github

copy

Full Screen

1#!/usr/bin/env python2#3# Copyright 2009 Google Inc. All Rights Reserved.4#5# Redistribution and use in source and binary forms, with or without6# modification, are permitted provided that the following conditions are7# met:8#9# * Redistributions of source code must retain the above copyright10# notice, this list of conditions and the following disclaimer.11# * Redistributions in binary form must reproduce the above12# copyright notice, this list of conditions and the following disclaimer13# in the documentation and/or other materials provided with the14# distribution.15# * Neither the name of Google Inc. nor the names of its16# contributors may be used to endorse or promote products derived from17# this software without specific prior written permission.18#19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30"""Verifies that test shuffling works."""31__author__ = 'wan@google.com (Zhanyong Wan)'32import os33import gtest_test_utils34# Command to run the gtest_shuffle_test_ program.35COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_shuffle_test_')36# The environment variables for test sharding.37TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'38SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX'39TEST_FILTER = 'A*.A:A*.B:C*'40ALL_TESTS = []41ACTIVE_TESTS = []42FILTERED_TESTS = []43SHARDED_TESTS = []44SHUFFLED_ALL_TESTS = []45SHUFFLED_ACTIVE_TESTS = []46SHUFFLED_FILTERED_TESTS = []47SHUFFLED_SHARDED_TESTS = []48def AlsoRunDisabledTestsFlag():49 return '--gtest_also_run_disabled_tests'50def FilterFlag(test_filter):51 return '--gtest_filter=%s' % (test_filter,)52def RepeatFlag(n):53 return '--gtest_repeat=%s' % (n,)54def ShuffleFlag():55 return '--gtest_shuffle'56def RandomSeedFlag(n):57 return '--gtest_random_seed=%s' % (n,)58def RunAndReturnOutput(extra_env, args):59 """Runs the test program and returns its output."""60 environ_copy = os.environ.copy()61 environ_copy.update(extra_env)62 return gtest_test_utils.Subprocess([COMMAND] + args, env=environ_copy).output63def GetTestsForAllIterations(extra_env, args):64 """Runs the test program and returns a list of test lists.65 Args:66 extra_env: a map from environment variables to their values67 args: command line flags to pass to gtest_shuffle_test_68 Returns:69 A list where the i-th element is the list of tests run in the i-th70 test iteration.71 """72 test_iterations = []73 for line in RunAndReturnOutput(extra_env, args).split('\n'):74 if line.startswith('----'):75 tests = []76 test_iterations.append(tests)77 elif line.strip():78 tests.append(line.strip()) # 'TestCaseName.TestName'79 return test_iterations80def GetTestCases(tests):81 """Returns a list of test cases in the given full test names.82 Args:83 tests: a list of full test names84 Returns:85 A list of test cases from 'tests', in their original order.86 Consecutive duplicates are removed.87 """88 test_cases = []89 for test in tests:90 test_case = test.split('.')[0]91 if not test_case in test_cases:92 test_cases.append(test_case)93 return test_cases94def CalculateTestLists():95 """Calculates the list of tests run under different flags."""96 if not ALL_TESTS:97 ALL_TESTS.extend(98 GetTestsForAllIterations({}, [AlsoRunDisabledTestsFlag()])[0])99 if not ACTIVE_TESTS:100 ACTIVE_TESTS.extend(GetTestsForAllIterations({}, [])[0])101 if not FILTERED_TESTS:102 FILTERED_TESTS.extend(103 GetTestsForAllIterations({}, [FilterFlag(TEST_FILTER)])[0])104 if not SHARDED_TESTS:105 SHARDED_TESTS.extend(106 GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',107 SHARD_INDEX_ENV_VAR: '1'},108 [])[0])109 if not SHUFFLED_ALL_TESTS:110 SHUFFLED_ALL_TESTS.extend(GetTestsForAllIterations(111 {}, [AlsoRunDisabledTestsFlag(), ShuffleFlag(), RandomSeedFlag(1)])[0])112 if not SHUFFLED_ACTIVE_TESTS:113 SHUFFLED_ACTIVE_TESTS.extend(GetTestsForAllIterations(114 {}, [ShuffleFlag(), RandomSeedFlag(1)])[0])115 if not SHUFFLED_FILTERED_TESTS:116 SHUFFLED_FILTERED_TESTS.extend(GetTestsForAllIterations(117 {}, [ShuffleFlag(), RandomSeedFlag(1), FilterFlag(TEST_FILTER)])[0])118 if not SHUFFLED_SHARDED_TESTS:119 SHUFFLED_SHARDED_TESTS.extend(120 GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',121 SHARD_INDEX_ENV_VAR: '1'},122 [ShuffleFlag(), RandomSeedFlag(1)])[0])123class GTestShuffleUnitTest(gtest_test_utils.TestCase):124 """Tests test shuffling."""125 def setUp(self):126 CalculateTestLists()127 def testShufflePreservesNumberOfTests(self):128 self.assertEqual(len(ALL_TESTS), len(SHUFFLED_ALL_TESTS))129 self.assertEqual(len(ACTIVE_TESTS), len(SHUFFLED_ACTIVE_TESTS))130 self.assertEqual(len(FILTERED_TESTS), len(SHUFFLED_FILTERED_TESTS))131 self.assertEqual(len(SHARDED_TESTS), len(SHUFFLED_SHARDED_TESTS))132 def testShuffleChangesTestOrder(self):133 self.assert_(SHUFFLED_ALL_TESTS != ALL_TESTS, SHUFFLED_ALL_TESTS)134 self.assert_(SHUFFLED_ACTIVE_TESTS != ACTIVE_TESTS, SHUFFLED_ACTIVE_TESTS)135 self.assert_(SHUFFLED_FILTERED_TESTS != FILTERED_TESTS,136 SHUFFLED_FILTERED_TESTS)137 self.assert_(SHUFFLED_SHARDED_TESTS != SHARDED_TESTS,138 SHUFFLED_SHARDED_TESTS)139 def testShuffleChangesTestCaseOrder(self):140 self.assert_(GetTestCases(SHUFFLED_ALL_TESTS) != GetTestCases(ALL_TESTS),141 GetTestCases(SHUFFLED_ALL_TESTS))142 self.assert_(143 GetTestCases(SHUFFLED_ACTIVE_TESTS) != GetTestCases(ACTIVE_TESTS),144 GetTestCases(SHUFFLED_ACTIVE_TESTS))145 self.assert_(146 GetTestCases(SHUFFLED_FILTERED_TESTS) != GetTestCases(FILTERED_TESTS),147 GetTestCases(SHUFFLED_FILTERED_TESTS))148 self.assert_(149 GetTestCases(SHUFFLED_SHARDED_TESTS) != GetTestCases(SHARDED_TESTS),150 GetTestCases(SHUFFLED_SHARDED_TESTS))151 def testShuffleDoesNotRepeatTest(self):152 for test in SHUFFLED_ALL_TESTS:153 self.assertEqual(1, SHUFFLED_ALL_TESTS.count(test),154 '%s appears more than once' % (test,))155 for test in SHUFFLED_ACTIVE_TESTS:156 self.assertEqual(1, SHUFFLED_ACTIVE_TESTS.count(test),157 '%s appears more than once' % (test,))158 for test in SHUFFLED_FILTERED_TESTS:159 self.assertEqual(1, SHUFFLED_FILTERED_TESTS.count(test),160 '%s appears more than once' % (test,))161 for test in SHUFFLED_SHARDED_TESTS:162 self.assertEqual(1, SHUFFLED_SHARDED_TESTS.count(test),163 '%s appears more than once' % (test,))164 def testShuffleDoesNotCreateNewTest(self):165 for test in SHUFFLED_ALL_TESTS:166 self.assert_(test in ALL_TESTS, '%s is an invalid test' % (test,))167 for test in SHUFFLED_ACTIVE_TESTS:168 self.assert_(test in ACTIVE_TESTS, '%s is an invalid test' % (test,))169 for test in SHUFFLED_FILTERED_TESTS:170 self.assert_(test in FILTERED_TESTS, '%s is an invalid test' % (test,))171 for test in SHUFFLED_SHARDED_TESTS:172 self.assert_(test in SHARDED_TESTS, '%s is an invalid test' % (test,))173 def testShuffleIncludesAllTests(self):174 for test in ALL_TESTS:175 self.assert_(test in SHUFFLED_ALL_TESTS, '%s is missing' % (test,))176 for test in ACTIVE_TESTS:177 self.assert_(test in SHUFFLED_ACTIVE_TESTS, '%s is missing' % (test,))178 for test in FILTERED_TESTS:179 self.assert_(test in SHUFFLED_FILTERED_TESTS, '%s is missing' % (test,))180 for test in SHARDED_TESTS:181 self.assert_(test in SHUFFLED_SHARDED_TESTS, '%s is missing' % (test,))182 def testShuffleLeavesDeathTestsAtFront(self):183 non_death_test_found = False184 for test in SHUFFLED_ACTIVE_TESTS:185 if 'DeathTest.' in test:186 self.assert_(not non_death_test_found,187 '%s appears after a non-death test' % (test,))188 else:189 non_death_test_found = True190 def _VerifyTestCasesDoNotInterleave(self, tests):191 test_cases = []192 for test in tests:193 [test_case, _] = test.split('.')194 if test_cases and test_cases[-1] != test_case:195 test_cases.append(test_case)196 self.assertEqual(1, test_cases.count(test_case),197 'Test case %s is not grouped together in %s' %198 (test_case, tests))199 def testShuffleDoesNotInterleaveTestCases(self):200 self._VerifyTestCasesDoNotInterleave(SHUFFLED_ALL_TESTS)201 self._VerifyTestCasesDoNotInterleave(SHUFFLED_ACTIVE_TESTS)202 self._VerifyTestCasesDoNotInterleave(SHUFFLED_FILTERED_TESTS)203 self._VerifyTestCasesDoNotInterleave(SHUFFLED_SHARDED_TESTS)204 def testShuffleRestoresOrderAfterEachIteration(self):205 # Get the test lists in all 3 iterations, using random seed 1, 2,206 # and 3 respectively. Google Test picks a different seed in each207 # iteration, and this test depends on the current implementation208 # picking successive numbers. This dependency is not ideal, but209 # makes the test much easier to write.210 [tests_in_iteration1, tests_in_iteration2, tests_in_iteration3] = (211 GetTestsForAllIterations(212 {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)]))213 # Make sure running the tests with random seed 1 gets the same214 # order as in iteration 1 above.215 [tests_with_seed1] = GetTestsForAllIterations(216 {}, [ShuffleFlag(), RandomSeedFlag(1)])217 self.assertEqual(tests_in_iteration1, tests_with_seed1)218 # Make sure running the tests with random seed 2 gets the same219 # order as in iteration 2 above. Success means that Google Test220 # correctly restores the test order before re-shuffling at the221 # beginning of iteration 2.222 [tests_with_seed2] = GetTestsForAllIterations(223 {}, [ShuffleFlag(), RandomSeedFlag(2)])224 self.assertEqual(tests_in_iteration2, tests_with_seed2)225 # Make sure running the tests with random seed 3 gets the same226 # order as in iteration 3 above. Success means that Google Test227 # correctly restores the test order before re-shuffling at the228 # beginning of iteration 3.229 [tests_with_seed3] = GetTestsForAllIterations(230 {}, [ShuffleFlag(), RandomSeedFlag(3)])231 self.assertEqual(tests_in_iteration3, tests_with_seed3)232 def testShuffleGeneratesNewOrderInEachIteration(self):233 [tests_in_iteration1, tests_in_iteration2, tests_in_iteration3] = (234 GetTestsForAllIterations(235 {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)]))236 self.assert_(tests_in_iteration1 != tests_in_iteration2,237 tests_in_iteration1)238 self.assert_(tests_in_iteration1 != tests_in_iteration3,239 tests_in_iteration1)240 self.assert_(tests_in_iteration2 != tests_in_iteration3,241 tests_in_iteration2)242 def testShuffleShardedTestsPreservesPartition(self):243 # If we run M tests on N shards, the same M tests should be run in244 # total, regardless of the random seeds used by the shards.245 [tests1] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',246 SHARD_INDEX_ENV_VAR: '0'},247 [ShuffleFlag(), RandomSeedFlag(1)])248 [tests2] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',249 SHARD_INDEX_ENV_VAR: '1'},250 [ShuffleFlag(), RandomSeedFlag(20)])251 [tests3] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',252 SHARD_INDEX_ENV_VAR: '2'},253 [ShuffleFlag(), RandomSeedFlag(25)])254 sorted_sharded_tests = tests1 + tests2 + tests3255 sorted_sharded_tests.sort()256 sorted_active_tests = []257 sorted_active_tests.extend(ACTIVE_TESTS)258 sorted_active_tests.sort()259 self.assertEqual(sorted_active_tests, sorted_sharded_tests)260if __name__ == '__main__':...

Full Screen

Full Screen

three.source.unit.js

Source:three.source.unit.js Github

copy

Full Screen

1import './utils/console-wrapper.js';2import './utils/qunit-utils.js';3//src4import './src/constants.tests';5import './src/utils.tests';6//src/animation7import './src/animation/AnimationAction.tests';8import './src/animation/AnimationClip.tests';9import './src/animation/AnimationMixer.tests';10import './src/animation/AnimationObjectGroup.tests';11import './src/animation/AnimationUtils.tests';12import './src/animation/KeyframeTrack.tests';13import './src/animation/PropertyBinding.tests';14import './src/animation/PropertyMixer.tests';15//src/animation/tracks16import './src/animation/tracks/BooleanKeyframeTrack.tests';17import './src/animation/tracks/ColorKeyframeTrack.tests';18import './src/animation/tracks/NumberKeyframeTrack.tests';19import './src/animation/tracks/QuaternionKeyframeTrack.tests';20import './src/animation/tracks/StringKeyframeTrack.tests';21import './src/animation/tracks/VectorKeyframeTrack.tests';22//src/audio23import './src/audio/Audio.tests';24import './src/audio/AudioAnalyser.tests';25import './src/audio/AudioContext.tests';26import './src/audio/AudioListener.tests';27import './src/audio/PositionalAudio.tests';28//src/cameras29import './src/cameras/ArrayCamera.tests';30import './src/cameras/Camera.tests';31import './src/cameras/CubeCamera.tests';32import './src/cameras/OrthographicCamera.tests';33import './src/cameras/PerspectiveCamera.tests';34import './src/cameras/StereoCamera.tests';35//src/core36import './src/core/BufferAttribute.tests';37import './src/core/BufferGeometry.tests';38import './src/core/Clock.tests';39import './src/core/EventDispatcher.tests';40import './src/core/InstancedBufferAttribute.tests';41import './src/core/InstancedBufferGeometry.tests';42import './src/core/InstancedInterleavedBuffer.tests';43import './src/core/InterleavedBuffer.tests';44import './src/core/InterleavedBufferAttribute.tests';45import './src/core/Layers.tests';46import './src/core/Object3D.tests';47import './src/core/Raycaster.tests';48import './src/core/Uniform.tests';49//src/extras50import './src/extras/ShapeUtils.tests';51//src/extras/core52import './src/extras/core/Curve.tests';53import './src/extras/core/CurvePath.tests';54import './src/extras/core/Font.tests';55import './src/extras/core/Interpolations.tests';56import './src/extras/core/Path.tests';57import './src/extras/core/Shape.tests';58import './src/extras/core/ShapePath.tests';59//src/extras/curves60import './src/extras/curves/ArcCurve.tests';61import './src/extras/curves/CatmullRomCurve3.tests';62import './src/extras/curves/CubicBezierCurve.tests';63import './src/extras/curves/CubicBezierCurve3.tests';64import './src/extras/curves/EllipseCurve.tests';65import './src/extras/curves/LineCurve.tests';66import './src/extras/curves/LineCurve3.tests';67import './src/extras/curves/QuadraticBezierCurve.tests';68import './src/extras/curves/QuadraticBezierCurve3.tests';69import './src/extras/curves/SplineCurve.tests';70//src/extras/objects71import './src/extras/objects/ImmediateRenderObject.tests';72//src/geometries73import './src/geometries/BoxGeometry.tests';74import './src/geometries/CircleGeometry.tests';75import './src/geometries/ConeGeometry.tests';76import './src/geometries/CylinderGeometry.tests';77import './src/geometries/DodecahedronGeometry.tests';78import './src/geometries/EdgesGeometry.tests';79import './src/geometries/ExtrudeGeometry.tests';80import './src/geometries/IcosahedronGeometry.tests';81import './src/geometries/LatheGeometry.tests';82import './src/geometries/OctahedronGeometry.tests';83import './src/geometries/ParametricGeometry.tests';84import './src/geometries/PlaneGeometry.tests';85import './src/geometries/PolyhedronGeometry.tests';86import './src/geometries/RingGeometry.tests';87import './src/geometries/ShapeGeometry.tests';88import './src/geometries/SphereGeometry.tests';89import './src/geometries/TetrahedronGeometry.tests';90import './src/geometries/TextGeometry.tests';91import './src/geometries/TorusGeometry.tests';92import './src/geometries/TorusKnotGeometry.tests';93import './src/geometries/TubeGeometry.tests';94import './src/geometries/WireframeGeometry.tests';95//src/helpers96import './src/helpers/ArrowHelper.tests';97import './src/helpers/AxesHelper.tests';98import './src/helpers/Box3Helper.tests';99import './src/helpers/BoxHelper.tests';100import './src/helpers/CameraHelper.tests';101import './src/helpers/DirectionalLightHelper.tests';102import './src/helpers/GridHelper.tests';103import './src/helpers/HemisphereLightHelper.tests';104import './src/helpers/PlaneHelper.tests';105import './src/helpers/PointLightHelper.tests';106import './src/helpers/PolarGridHelper.tests';107import './src/helpers/SkeletonHelper.tests';108import './src/helpers/SpotLightHelper.tests';109//src/lights110import './src/lights/AmbientLight.tests';111import './src/lights/DirectionalLight.tests';112import './src/lights/DirectionalLightShadow.tests';113import './src/lights/HemisphereLight.tests';114import './src/lights/Light.tests';115import './src/lights/LightShadow.tests';116import './src/lights/PointLight.tests';117import './src/lights/RectAreaLight.tests';118import './src/lights/SpotLight.tests';119import './src/lights/SpotLightShadow.tests';120//src/loaders121import './src/loaders/AnimationLoader.tests';122import './src/loaders/AudioLoader.tests';123import './src/loaders/BufferGeometryLoader.tests';124import './src/loaders/Cache.tests';125import './src/loaders/CompressedTextureLoader.tests';126import './src/loaders/CubeTextureLoader.tests';127import './src/loaders/DataTextureLoader.tests';128import './src/loaders/FileLoader.tests';129import './src/loaders/FontLoader.tests';130import './src/loaders/ImageLoader.tests';131import './src/loaders/Loader.tests';132import './src/loaders/LoaderUtils.tests';133import './src/loaders/LoadingManager.tests';134import './src/loaders/MaterialLoader.tests';135import './src/loaders/ObjectLoader.tests';136import './src/loaders/TextureLoader.tests';137//src/materials138import './src/materials/LineBasicMaterial.tests';139import './src/materials/LineDashedMaterial.tests';140import './src/materials/Material.tests';141import './src/materials/MeshBasicMaterial.tests';142import './src/materials/MeshDepthMaterial.tests';143import './src/materials/MeshDistanceMaterial.tests';144import './src/materials/MeshLambertMaterial.tests';145import './src/materials/MeshNormalMaterial.tests';146import './src/materials/MeshPhongMaterial.tests';147import './src/materials/MeshPhysicalMaterial.tests';148import './src/materials/MeshStandardMaterial.tests';149import './src/materials/MeshToonMaterial.tests';150import './src/materials/PointsMaterial.tests';151import './src/materials/RawShaderMaterial.tests';152import './src/materials/ShaderMaterial.tests';153import './src/materials/ShadowMaterial.tests';154import './src/materials/SpriteMaterial.tests';155//src/math156import './src/math/Box2.tests';157import './src/math/Box3.tests';158import './src/math/Color.tests';159import './src/math/Cylindrical.tests';160import './src/math/Euler.tests';161import './src/math/Frustum.tests';162import './src/math/Interpolant.tests';163import './src/math/Line3.tests';164import './src/math/MathUtils.tests';165import './src/math/Matrix3.tests';166import './src/math/Matrix4.tests';167import './src/math/Plane.tests';168import './src/math/Quaternion.tests';169import './src/math/Ray.tests';170import './src/math/Sphere.tests';171import './src/math/Spherical.tests';172import './src/math/Triangle.tests';173import './src/math/Vector2.tests';174import './src/math/Vector3.tests';175import './src/math/Vector4.tests';176//src/math/interpolants177import './src/math/interpolants/CubicInterpolant.tests';178import './src/math/interpolants/DiscreteInterpolant.tests';179import './src/math/interpolants/LinearInterpolant.tests';180import './src/math/interpolants/QuaternionLinearInterpolant.tests';181//src/objects182import './src/objects/Bone.tests';183import './src/objects/Group.tests';184import './src/objects/Line.tests';185import './src/objects/LineLoop.tests';186import './src/objects/LineSegments.tests';187import './src/objects/LOD.tests';188import './src/objects/Mesh.tests';189import './src/objects/Points.tests';190import './src/objects/Skeleton.tests';191import './src/objects/SkinnedMesh.tests';192import './src/objects/Sprite.tests';193//src/renderers194import './src/renderers/WebGLRenderer.tests';195import './src/renderers/WebGLRenderTarget.tests';196import './src/renderers/WebGLCubeRenderTarget.tests';197//src/renderers/shaders198import './src/renderers/shaders/ShaderChunk.tests';199import './src/renderers/shaders/ShaderLib.tests';200import './src/renderers/shaders/UniformsLib.tests';201import './src/renderers/shaders/UniformsUtils.tests';202//src/renderers/webgl203import './src/renderers/webgl/WebGLAttributes.tests';204import './src/renderers/webgl/WebGLBackground.tests';205import './src/renderers/webgl/WebGLBufferRenderer.tests';206import './src/renderers/webgl/WebGLCapabilities.tests';207import './src/renderers/webgl/WebGLClipping.tests';208import './src/renderers/webgl/WebGLExtensions.tests';209import './src/renderers/webgl/WebGLGeometries.tests';210import './src/renderers/webgl/WebGLIndexedBufferRenderer.tests';211import './src/renderers/webgl/WebGLLights.tests';212import './src/renderers/webgl/WebGLMorphtargets.tests';213import './src/renderers/webgl/WebGLObjects.tests';214import './src/renderers/webgl/WebGLProgram.tests';215import './src/renderers/webgl/WebGLPrograms.tests';216import './src/renderers/webgl/WebGLProperties.tests';217import './src/renderers/webgl/WebGLRenderLists.tests';218import './src/renderers/webgl/WebGLShader.tests';219import './src/renderers/webgl/WebGLShadowMap.tests';220import './src/renderers/webgl/WebGLState.tests';221import './src/renderers/webgl/WebGLTextures.tests';222import './src/renderers/webgl/WebGLUniforms.tests';223import './src/renderers/webgl/WebGLUtils.tests';224//src/scenes225import './src/scenes/Fog.tests';226import './src/scenes/FogExp2.tests';227import './src/scenes/Scene.tests';228//src/textures229import './src/textures/CanvasTexture.tests';230import './src/textures/CompressedTexture.tests';231import './src/textures/CubeTexture.tests';232import './src/textures/DataTexture.tests';233import './src/textures/DepthTexture.tests';234import './src/textures/Texture.tests';...

Full Screen

Full Screen

three.editor.unit.js

Source:three.editor.unit.js Github

copy

Full Screen

1/**2 * @author TristanVALCKE / https://github.com/Itee3 */4// TODO (Itee) Editor is not es6 module so care to include order !!!5// TODO: all views could not be testable, waiting modular code before implement units tests on them6import './unit/qunit-utils.js';7//editor8import './unit/editor/Command.tests';9import './unit/editor/Config.tests';10import './unit/editor/Editor.tests';11import './unit/editor/History.tests';12import './unit/editor/Loader.tests';13import './unit/editor/Player.tests';14import './unit/editor/Script.tests';15import './unit/editor/Menubar.tests';16import './unit/editor/Menubar.Add.tests';17import './unit/editor/Menubar.Edit.tests';18import './unit/editor/Menubar.Examples.tests';19import './unit/editor/Menubar.File.tests';20import './unit/editor/Menubar.Help.tests';21import './unit/editor/Menubar.Play.tests';22import './unit/editor/Menubar.Status.tests';23import './unit/editor/Menubar.View.tests';24import './unit/editor/Sidebar.tests';25import './unit/editor/Sidebar.Animation.tests';26import './unit/editor/Sidebar.Geometry.tests';27import './unit/editor/Sidebar.Geometry.BoxGeometry.tests';28import './unit/editor/Sidebar.Geometry.BufferGeometry.tests';29import './unit/editor/Sidebar.Geometry.CircleGeometry.tests';30import './unit/editor/Sidebar.Geometry.CylinderGeometry.tests';31import './unit/editor/Sidebar.Geometry.Geometry.tests';32import './unit/editor/Sidebar.Geometry.IcosahedronGeometry.tests';33import './unit/editor/Sidebar.Geometry.LatheGeometry.tests';34import './unit/editor/Sidebar.Geometry.Modifiers.tests';35import './unit/editor/Sidebar.Geometry.PlaneGeometry.tests';36import './unit/editor/Sidebar.Geometry.SphereGeometry.tests';37import './unit/editor/Sidebar.Geometry.TeapotBufferGeometry.tests';38import './unit/editor/Sidebar.Geometry.TorusGeometry.tests';39import './unit/editor/Sidebar.Geometry.TorusKnotGeometry.tests';40import './unit/editor/Sidebar.History.tests';41import './unit/editor/Sidebar.Material.tests';42import './unit/editor/Sidebar.Object.tests';43import './unit/editor/Sidebar.Project.tests';44import './unit/editor/Sidebar.Properties.tests';45import './unit/editor/Sidebar.Scene.tests';46import './unit/editor/Sidebar.Script.tests';47import './unit/editor/Sidebar.Settings.tests';48import './unit/editor/Storage.tests';49import './unit/editor/Toolbar.tests';50import './unit/editor/Viewport.tests';51import './unit/editor/Viewport.Info.tests';52//editor/commands53import './unit/editor/commands/AddObjectCommand.tests';54import './unit/editor/commands/AddScriptCommand.tests';55import './unit/editor/commands/MoveObjectCommand.tests';56import './unit/editor/commands/MultiCmdsCommand.tests';57import './unit/editor/commands/RemoveObjectCommand.tests';58import './unit/editor/commands/RemoveScriptCommand.tests';59import './unit/editor/commands/SetColorCommand.tests';60import './unit/editor/commands/SetGeometryCommand.tests';61import './unit/editor/commands/SetGeometryValueCommand.tests';62import './unit/editor/commands/SetMaterialColorCommand.tests';63import './unit/editor/commands/SetMaterialCommand.tests';64import './unit/editor/commands/SetMaterialMapCommand.tests';65import './unit/editor/commands/SetMaterialValueCommand.tests';66import './unit/editor/commands/SetPositionCommand.tests';67import './unit/editor/commands/SetRotationCommand.tests';68import './unit/editor/commands/SetScaleCommand.tests';69import './unit/editor/commands/SetSceneCommand.tests';70import './unit/editor/commands/SetScriptValueCommand.tests';71import './unit/editor/commands/SetUuidCommand.tests';72import './unit/editor/commands/SetValueCommand.tests';...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import {tests} from 'storybook-root'2import {storiesOf} from '@storybook/react-native'3import {withTests} from '@storybook/addon-jest'4import {withKnobs} from '@storybook/addon-knobs'5const results = tests(require.context('../src', true, /\.test\.js$/))6storiesOf('Test', module)7 .addDecorator(withKnobs)8 .addDecorator(withTests({results}))9 .add('Test', () => {10 })11import {configure} from '@storybook/react-native'12import {loadStories} from './storybook-registry'13const req = require.context('../src', true, /\.stories\.js$/)14function loadStories() {15 req.keys().forEach(filename => req(filename))16}17configure(loadStories, module)18import {tests} from 'storybook-root'19import {addParameters} from '@storybook/react-native'20import {withTests} from '@storybook/addon-jest'21import {withKnobs} from '@storybook/addon-knobs'22const results = tests(require.context('../src', true, /\.test\.js$/))23addParameters({24 options: {25 },26 viewport: {27 viewports: {28 responsive: {29 styles: {30 },31 },32 iphone5: {33 styles: {34 },35 },36 iphone6: {37 styles: {38 },39 },40 iphone6plus: {41 styles: {42 },43 },44 ipad: {45 styles: {46 },

Full Screen

Using AI Code Generation

copy

Full Screen

1import { storiesOf } from 'storybook-root';2storiesOf('test', module)3 .add('test', () => {4 return <div>test</div>;5 });6import 'storybook-root';7const { tests } = require('storybook-root');8module.exports = (baseConfig, env, config) => {9 config.module.rules = tests(config.module.rules);10 return config;11};12import 'storybook-root';

Full Screen

Using AI Code Generation

copy

Full Screen

1import { storiesOf } from '@storybook/react';2import { tests } from 'storybook-root';3storiesOf('Hello', module)4 .add('world', () => <h1>Hello world!</h1>)5 .tests('world', tests);6import React from 'react';7import { storiesOf } from '@storybook/react';8import { tests } from 'storybook-root';9storiesOf('Hello', module)10 .add('world', () => <h1>Hello world!</h1>)11 .tests('world', tests);12import React from 'react';13import { storiesOf } from '@storybook/react';14import { tests } from 'storybook-root';15storiesOf('Hello', module)16 .add('world', () => <h1>Hello world!</h1>)17 .tests('world', tests);18import React from 'react';19import { storiesOf } from '@storybook/react';20import { tests } from 'storybook-root';21storiesOf('Hello', module)22 .add('world', () => <h1>Hello world!</h1>)23 .tests('world', tests);24import React from 'react';25import { storiesOf } from '@storybook/react';26import { tests } from 'storybook-root';27storiesOf('Hello', module)28 .add('world', () => <h1>Hello world!</h1>)29 .tests('world', tests);30import React from 'react';31import { storiesOf } from '@storybook/react';32import { tests } from 'storybook-root';33storiesOf('Hello', module)34 .add('world', () => <h1>Hello world!</h1>)35 .tests('world', tests);36import React from 'react';37import { storiesOf } from '@storybook/react';38import { tests } from 'storybook-root';39storiesOf('Hello', module)40 .add('world', () => <h1>Hello world!</h1>)41 .tests('world', tests);

Full Screen

Using AI Code Generation

copy

Full Screen

1import { test } from 'storybook-root';2test('test', () => {3 expect(true).to.equal(true);4});5"scripts": {6 }

Full Screen

Using AI Code Generation

copy

Full Screen

1const { test } = require('storybook-root');2const path = require('path');3test(path.resolve(__dirname, 'tests'));4const { test } = require('storybook-root');5const path = require('path');6test(path.resolve(__dirname, 'tests'));7import React from 'react';8import { storiesOf, addDecorator } from '@storybook/react';9import { withInfo } from '@storybook/addon-info';10import { withKnobs } from '@storybook/addon-knobs';11import { withTests } from 'storybook-addon-jest';12import results from '../test1/test-result.json';13import { Button } from '../src';14storiesOf('Button', module)15 .addDecorator(withKnobs)16 .addDecorator(withInfo)17 .addDecorator(withTests({ results }))18 .add('with text', () => <Button>Hello Button</Button>)19 .add('with some emoji', () => (20 ));

Full Screen

Using AI Code Generation

copy

Full Screen

1import {tests} from 'storybook-root';2tests.run(['./test1.js', './test2.js']);3tests.check();4tests.runAndCheck(['./test1.js', './test2.js']);5tests.runAndCheck(['./test1.js', './test2.js'], function(){6});7tests.runAndCheck(['./test1.js', './test2.js'], function(){8}, function(){9});10tests.runAndCheck(['./test1.js', './test2.js'], function(){11}, function(){12}, function(){13});14tests.runAndCheck(['./test1.js', './test2.js'], function(){15}, function(){16}, function(){17}, function(){18}, 1000);19tests.runAndCheck(['./test1.js', './test2.js'], function(){20}, function(){21}, function(){22}, function(){23}, 1000, 1000);24tests.runAndCheck(['./test1.js', './test2.js'], function(){25}, function(){26}, function(){27}, function(){28}, 1000, 100

Full Screen

Using AI Code Generation

copy

Full Screen

1import { tests } from 'storybook-root'2tests('Storybook-root')3 .add('Storybook-root', () => <StorybookRoot />)4 .run()5import { tests } from 'storybook-root'6tests('Storybook-root')7 .add('Storybook-root', () => <StorybookRoot />)8 .run()9import { tests } from 'storybook-root'10tests('Storybook-root')11 .add('Storybook-root', () => <StorybookRoot />)12 .run()13import { tests } from 'storybook-root'14tests('Storybook-root')15 .add('Storybook-root', () => <StorybookRoot />)16 .run()17import { tests } from 'storybook-root'18tests('Storybook-root')19 .add('Storybook-root', () => <StorybookRoot />)20 .run()21import { tests } from 'storybook-root'22tests('Storybook-root')23 .add('Storybook-root', () => <StorybookRoot />)24 .run()25import { tests } from 'storybook-root'26tests('Storybook-root')27 .add('Storybook-root', () => <StorybookRoot />)28 .run()29import { tests } from 'storybook-root'30tests('Storybook-root')31 .add('Storybook-root', () => <StorybookRoot />)

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run storybook-root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful