JavaScript Promiseの本 v1コールバックスタイルのテスト コールバックスタイルの非同期処理をテストする場合、Mochaでは以下のように書くことが できます。 basic-test.js var assert = require('assert'); it('should use `done` for test', function (done) { setTimeout(function () { を呼ぶ代わりに、promiseオブジェ クトをreturnすることができると書いてあります。 では、実際にどのように書くかの例を見ていきたいと思います。 mocha-promise-test.js var assert = require('assert'); describe('Promise Test', function () { it('should return a promise object', function の例を元にonRejectedを期待してテストできる shouldRejected というヘルパー関数を作ってみたいと思います。 shouldRejected-test.js var assert = require('assert'); function shouldRejected(promise) { return { 'catch': function (fn) {0 码力 | 115 页 | 1.06 MB | 1 年前3
JavaScript Promiseの本 v2コールバックスタイルのテスト コールバックスタイルの非同期処理をテストする場合、Mochaでは以下のように書くことが できます。 basic-test.js const assert = require("assert"); it("should use `done` for test", (done) => { setTimeout(() => { assert(true); クトをreturnすることができると書いてあります。 では、実際にどのように書くかの例を見ていきたいと思います。 mocha-promise-test.js const assert = require("assert"); describe("Promise Test", () => { it("should return a promise object", () => { の例を元にonRejectedを期待してテストできる shouldRejected というヘルパー関数を作ってみたいと思います。 shouldRejected-test.js const assert = require("assert"); function shouldRejected(promise) { return { "catch": function(fn) {0 码力 | 137 页 | 1.17 MB | 1 年前3
KiCad 8.0 Schematic Editorwhether you wish to maintain a wired connection between the pins and the labels. NOTE Pin helpers require you to select individual pins, not their parent symbol. Pins cannot be individually selected if the orphaned symbols using the Change Symbols or Edit Symbol Library Links dialogs, but either option may require manual corrections to the schematic. These tools are explained in more detail in the Updating and they are passives and automatically assign an appropriate simulation model. Therefore they do not require any special settings; users only need to set the Value field of the symbol. KiCad infers simulation0 码力 | 194 页 | 7.86 MB | 1 年前3
KiCad 8.0 ことはじめfor both the VCC and GND nets. This is a common KiCad ERC error. Power symbols are set up to require a power output pin, such as the output of a voltage regulator, on the same net; otherwise KiCad window. For this guide, leave the number of copper layers at 2, but more complicated projects might require more layers. 22 Next, go to the Design Rules → Constraints page. The settings on this page specify be improved by adding a switch to turn the LED on and off. The process to add this switch will require creating a new symbol and footprint library, drawing a switch symbol, and creating a footprint for0 码力 | 53 页 | 2.34 MB | 1 年前3
KiCad 8.0 イントロダクションthe recommended workflow for transferring information from the schematic to the board does not require the use of netlist files. *.cmp Association between components used in the schematic and their footprints the recommended workflow for transferring information from the board to the schematic does not require the use of .cmp files. Fabrication and documentation files *.gbr Gerber files, for fabrication0 码力 | 25 页 | 705.63 KB | 1 年前3
KiCad 8.0 PCB Editoraccessible after the pattern is initially created, so changing a target length or skew in this way may require the pattern to be adjusted to meet the new target value, if the pattern’s geometric constraints they automatically reflow text within that border. Text boxes are placed with the button, and require clicking twice to specify the top left and bottom right corners of the box. Ctrl Shift T 61 (constraint zone_connection solid) (condition "A.Fabrication_Property == 'Heatsink pad'")) # Require all four thermal relief spokes to connect to parent zone (rule fully_spoked_pads (constraint0 码力 | 204 页 | 6.90 MB | 1 年前3
TVM Meetup: Quantizationops from scratch • New Relay passes and TVM schedules required • AlterOpLayout, Graph Fusion etc require work/operator • No reuse of existing Relay and TVM infrastructure. Option 2 – Lower to a sequence0 码力 | 19 页 | 489.50 KB | 5 月前3
Krita 5.2 マニュアル
axonometric with the transform tool Now, there's an alternative way of getting there that doesn't require as much space. We open our orthographic with Open existing Document as Untitled Document so that this capture interval to pass before making a new snap shot. This means quick strokes will not each require a new snapshot. Increase this if you want less snapshots to be recorded during a painting session management of multiple optional comment fields. While some projects might require only one comment field for dialog per scene, some might require additional fields that describe character actions or camera directions0 码力 | 1591 页 | 79.16 MB | 1 年前3
PlantUML 1.2019.6 言語リファレンスガイドcall a function. It is possible to use the unquoted keyword to indicate that a function does not require quotes for its arguments. @startuml !unquoted function id($text1, $text2="FOO") return $text1 +0 码力 | 174 页 | 1.99 MB | 1 年前3
PlantUML 1.2019.9 言語リファレンスガイドcall a function. It is possible to use the unquoted keyword to indicate that a function does not require quotes for its arguments. @startuml !unquoted function id($text1, $text2="FOO") return $text1 +0 码力 | 175 页 | 2.02 MB | 1 年前3
共 16 条
- 1
- 2













