File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed
Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,8 @@ def js_variables
9292 prefix = @configuration . prefix
9393 prefix = prefix . call if prefix . is_a? ( Proc )
9494 {
95- # 'GEM_VERSION' => JsRoutes::VERSION,
9695 'ROUTES_OBJECT' => routes_object ,
97- # 'RAILS_VERSION' => ::Rails.version,
9896 'DEPRECATED_FALSE_PARAMETER_BEHAVIOR' => Rails . version < '7.0.0' ,
99- # 'APP_CLASS' => application.class.to_s,
10097 'DEFAULT_URL_OPTIONS' => json ( @configuration . default_url_options ) ,
10198 'PREFIX' => json ( prefix ) ,
10299 'SPECIAL_OPTIONS_KEY' => json ( @configuration . special_options_key ) ,
Original file line number Diff line number Diff line change 1- /**
2- * File generated by js-routes 2.3.1 on 2024-12-03 19:55:47 +0100
3- * Based on Rails 7.2.0 routes of App
4- */
51declare type Optional < T > = {
62 [ P in keyof T ] ?: T [ P ] | null ;
73} ;
Original file line number Diff line number Diff line change 2727 end
2828
2929 context "when file is generated" do
30+ let ( :extra_options ) do
31+ { banner : nil }
32+ end
33+
3034 let ( :dir_name ) do
3135 File . expand_path ( __dir__ + "/dts" )
3236 end
Original file line number Diff line number Diff line change 508508 expect ( generated_js ) . not_to include ( "@returns" )
509509 end
510510 end
511+
512+ describe "banner option" do
513+ let ( :_options ) { { banner : nil } }
514+
515+ it "disables banner generation" do
516+ expect ( generated_js ) . not_to include ( "File generated by js-routes" )
517+ expect ( generated_js ) . not_to include ( "Based on Rails" )
518+ end
519+ end
511520end
You can’t perform that action at this time.
0 commit comments