... om the command line. The tests are located in a top level js_tests directory. テストを書く ¶ Django's JavaScript tests use QUnit . Here is an example test module: QUnit . module ( 'magicTricks' , { beforeEach : function () { const $ = django . jQuery ... ; $ ( '#qunit-fixture' ). append ( '<button class="button"></button>' ); } }); QUnit . test ( 'removeOnClick removes button on click' , ... rt . equal ( $ ( '.button' ). length , 1 ); $ ( '.button' ). click (); assert . equal ( $ ( '.button' ). length , 0 ); }); QUnit . test ( 'copyOnClick adds button on click' , function ( assert ) { const $ = django . jQuery ; copyOnClick ( '.button' ); ... ... om the command line. The tests are located in a top level js_tests directory. テストを書く ¶ Django's JavaScript tests use QUnit . Here is an example test module: QUnit . module ( 'magicTricks' , { beforeEach : function () { const $ = django . jQuery ... ; $ ( '#qunit-fixture' ). append ( '<button class="button"></button>' ); } }); QUnit . test ( 'removeOnClick removes button on click' , ... rt . equal ( $ ( '.button' ). length , 1 ); $ ( '.button' ). click (); assert . equal ( $ ( '.button' ). length , 0 ); }); QUnit . test ( 'copyOnClick adds button on click' , function ( assert ) { const $ = django . jQuery ; copyOnClick ( '.button' ); ... 2026年10月08日