cd94c4489c3d902a240e03f61c8c73417430e1 ">dccd94c448 :art: Opt api model/cameras 5 years ago 0046_cameramodelinfo.py dccd94c448 :art: Opt api model/cameras 5 years ago 0047_auto_20200304_1848.py dccd94c448 :art: Opt api model/cameras 5 years ago 0048_modelcamerabodyinfo_is_important.py 43455cdf4e :art: Support is_important 5 years ago 0049_modelcamerabodyinfo_camera_market_time.py da799e7af6 :art: Add field camera_market_time for CameraModelInfo/ModelCameraBodyInfo 5 years ago 0050_cameramodelinfo_camera_market_time.py da799e7af6 :art: Add field camera_market_time for CameraModelInfo/ModelCameraBodyInfo 5 years ago 0051_auto_20200314_2340.py 7dc0b7fc6b :art: Makemigrations 5 years ago 0052_consumeinfosubmitloginfo_code_version.py 03631cb847 add code_version 5 years ago 0053_auto_20200407_1118.py 608bdf8508 makemigrations 5 years ago 0054_auto_20200411_2143.py 58c38a0546 整理 优惠券 5 years ago 0055_auto_20200601_1634.py 89c3cefcc7 saleclerk migrate 5 years ago 0056_auto_20200601_1640.py 3872355991 add department_name 5 years ago 0057_auto_20200602_1403.py 11df57b63d support qy login 5 years ago 0058_auto_20201202_1203.py 6a9e324f6f :art: Re Makemigrations 4 years ago 0059_auto_20201221_1115.py 4ba79f76cd 后台管理,添加运营人员角色 4 years ago 0060_modelinfo_is_show_shot.py 45f886651e 添加 is_show_shot 用于控制是否在前端显示 4 years ago __init__.py aa31a5f59a Add kodo 7 years ago adminSystem - Gogs: Go Git Service

Geen omschrijving

setup_jest_globals.js 3.2KB

    'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _expect = require('expect'); var _jestSnapshot = require('jest-snapshot'); // Get suppressed errors form jest-matchers that weren't throw during // test execution and add them to the test result, potentially failing // a passing test. /** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ const addSuppressedErrors = result => { var _getState = (0, _expect.getState)(); const suppressedErrors = _getState.suppressedErrors; (0, _expect.setState)({ suppressedErrors: [] }); if (suppressedErrors.length) { result.status = 'failed'; result.failedExpectations = suppressedErrors.map(error => ({ actual: '', // passing error for custom test reporters error, expected: '', message: error.message, passed: false, stack: error.stack })); } }; const addAssertionErrors = result => { const assertionErrors = (0, _expect.extractExpectedAssertionsErrors)(); if (assertionErrors.length) { const jasmineErrors = assertionErrors.map((_ref) => { let actual = _ref.actual, error = _ref.error, expected = _ref.expected; return { actual, expected, message: error.stack, passed: false }; }); result.status = 'failed'; result.failedExpectations = result.failedExpectations.concat(jasmineErrors); } }; const patchJasmine = () => { global.jasmine.Spec = (realSpec => { const Spec = function Spec(attr) { const resultCallback = attr.resultCallback; attr.resultCallback = function (result) { addSuppressedErrors(result); addAssertionErrors(result); resultCallback.call(attr, result); }; const onStart = attr.onStart; attr.onStart = context => { (0, _expect.setState)({ currentTestName: context.getFullName() }); onStart && onStart.call(attr, context); }; realSpec.call(this, attr); }; Spec.prototype = realSpec.prototype; for (const statics in realSpec) { if (Object.prototype.hasOwnProperty.call(realSpec, statics)) { Spec[statics] = realSpec[statics]; } } return Spec; })(global.jasmine.Spec); }; exports.default = (_ref2) => { let config = _ref2.config, globalConfig = _ref2.globalConfig, localRequire = _ref2.localRequire, testPath = _ref2.testPath; // Jest tests snapshotSerializers in order preceding built-in serializers. // Therefore, add in reverse because the last added is the first tested. config.snapshotSerializers.concat().reverse().forEach(path => { (0, _jestSnapshot.addSerializer)(localRequire(path)); }); patchJasmine(); const expand = globalConfig.expand, updateSnapshot = globalConfig.updateSnapshot; const snapshotState = new _jestSnapshot.SnapshotState(testPath, { expand, updateSnapshot }); (0, _expect.setState)({ snapshotState, testPath }); // Return it back to the outer scope (test runner outside the VM). return snapshotState; };