$manager =
$this->
createImportMapManager( ['assets' => '', 'assets2' => 'namespaced_assets2'
],
__DIR__.'/../fixtures/importmaps/'
);
$this->
assertEquals([ 'https://unpkg.com/@hotwired/stimulus@3.2.1/dist/stimulus.js',
'/assets/app-ea9ebe6156adc038aba53164e2be0867.js',
// these are non-lazily imported from app.js
'/assets/pizza/index-b3fb5ee31adaf5e1b32d28edf1ab8e7a.js',
'/assets/popcorn-c0778b84ef9893592385aebc95a2896e.js',
],
$manager->
getModulesToPreload());
} public function testGetImportMapJson() { $manager =
$this->
createImportMapManager( ['assets' => '', 'assets2' => 'namespaced_assets2'
],
__DIR__.'/../fixtures/importmaps/'
);
$this->
assertEquals(['imports' =>
[ '@hotwired/stimulus' => 'https://unpkg.com/@hotwired/stimulus@3.2.1/dist/stimulus.js',
'lodash' => '/assets/vendor/lodash-ad7bd7bf42edd09654255a82b9027810.js',