You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/it-IT.md
+46-45Lines changed: 46 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2078,10 +2078,11 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
2078
2078
2079
2079
## Logica di Startup
2080
2080
2081
-
### Configuration
2082
-
- Inject code into [module configuration](https://docs.angularjs.org/guide/module#module-loading-dependencies) that must be configured before running the angular app. Ideal candidaes include providers and constants.
2081
+
### Configurazione
2082
+
2083
+
- Inietta codice nel [modulo di configurazione](https://docs.angularjs.org/guide/module#module-loading-dependencies) che deve essere configurato prima dell'esecuzione dell'app angular. I candidati ideali includono provider e costanti.
2083
2084
2084
-
*Why?:* This makes it easier to have a less places for configuration.
2085
+
*Perché?:* Questo rende più facile ottenere pochi posti atti alla configurazione
2085
2086
2086
2087
```javascript
2087
2088
angular
@@ -2108,11 +2109,11 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
2108
2109
}
2109
2110
```
2110
2111
2111
-
### Run Blocks
2112
+
### Blocchi Run
2112
2113
2113
-
- Any code that needs to run when an application starts should be declared in a factory, exposed via a function, and injected into the [run block](https://docs.angularjs.org/guide/module#module-loading-dependencies).
2114
+
- Qualunche codice che necessiti di essere eseguito quando un'applicazione si avvia dovrebbe essere dichiarato in una factory, esposto tramite funzione ed iniettato nel [blocco run](https://docs.angularjs.org/guide/module#module-loading-dependencies).
2114
2115
2115
-
*Perché?*: Code directly in a run block can be difficult to test. Placing in a factory makes it easier to abstract and mock.
2116
+
*Perché?*: Codice posto direttamente in un blocco run può essere difficile da testate. Metterlo in una factory lo rende più astratto e simulabile (farne un mock).
2116
2117
2117
2118
```javascript
2118
2119
angular
@@ -2131,102 +2132,102 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
2131
2132
2132
2133
## Wrapper dei Servizi $ di Angular
2133
2134
2134
-
### $document and $window
2135
+
### $document e $window
2135
2136
2136
-
- Use [`$document`](https://docs.angularjs.org/api/ng/service/$document) and [`$window`](https://docs.angularjs.org/api/ng/service/$window) instead of `document`and`window`.
2137
+
- Usa [`$document`](https://docs.angularjs.org/api/ng/service/$document) e [`$window`](https://docs.angularjs.org/api/ng/service/$window) al posto di `document`e`window`.
2137
2138
2138
-
*Perché?*: These services are wrapped by Angular and more easily testable than using document and window in tests. This helps you avoid having to mock document and window yourself.
2139
+
*Perché?*: Questi servizi sono gestiti da Angular e più facilmente testabili che l'uso di document e window nei test. Ciò ti aiuta ad evitare di fare mock di document e window.
2139
2140
2140
-
### $timeout and $interval
2141
+
### $timeout e $interval
2141
2142
2142
-
- Use [`$timeout`](https://docs.angularjs.org/api/ng/service/$timeout) and [`$interval`](https://docs.angularjs.org/api/ng/service/$interval) instead of `setTimeout`and`setInterval` .
2143
+
- Usa [`$timeout`](https://docs.angularjs.org/api/ng/service/$timeout) e [`$interval`](https://docs.angularjs.org/api/ng/service/$interval) al posto di `setTimeout`e`setInterval` .
2143
2144
2144
-
*Perché?*: These services are wrapped by Angular and more easily testable and handle AngularJS's digest cycle thus keeping data binding in sync.
2145
+
*Perché?*: Questi servizi sono gestiti da Angular e più facilmente testabili e trattano il ciclo di digest di AngularJS quindi tengono il data binding sincronizzato.
2145
2146
2146
2147
**[Torna all'inizio](#table-of-contents)**
2147
2148
2148
2149
## Test
2149
-
Unit testing helps maintain clean code, as such I included some of my recommendations for unit testing foundations with links for more information.
2150
+
Gli unit test aiutano a mantenere il codice più chiaro, perciò ho incluso alcune mie raccomandazioni fondamentali per lo unit testing con link e uteriori informazioni.
2150
2151
2151
-
### Write Tests with Stories
2152
+
### Scrivi i test con le Storie
2152
2153
2153
-
- Write a set of tests for every story. Start with an empty test and fill them in as you write the code for the story.
2154
+
- Scrivi un set di test per ogni storia. Inizia con un test vuoto e riempilo fino a scrivere il codice per la storia.
2154
2155
2155
-
*Perché?*: Writing the test descriptions helps clearly define what your story will do, will not do, and how you can measure success.
2156
+
*Perché?*: Scrivere la descrizione del test aiuta a definire chiaramente cosa la tua stoia farà, non farà e come puoi misurarne il successo.
2156
2157
2157
2158
```javascript
2158
-
it('should have Avengers controller', function() {
2159
+
it('dovrebbe avere il controller Avenger', function() {
2159
2160
//TODO
2160
2161
});
2161
2162
2162
-
it('should find 1 Avenger when filtered by name', function() {
2163
+
it('dovrebbe trovare 1 Avenger quando filtrato per nome', function() {
2163
2164
//TODO
2164
2165
});
2165
2166
2166
-
it('should have 10 Avengers', function() {}
2167
-
//TODO (mock data?)
2167
+
it('dovrebbe avere 10 Avenger', function() {}
2168
+
//TODO (fare un mock dei dati?)
2168
2169
});
2169
2170
2170
-
it('should return Avengers via XHR', function() {}
2171
+
it('dovrebbe ritornare Avenger via XHR', function() {}
2171
2172
//TODO ($httpBackend?)
2172
2173
});
2173
2174
2174
-
//and so on
2175
+
//continuare
2175
2176
```
2176
2177
2177
2178
### Testing Library
2178
2179
2179
-
- Use [Jasmine](http://jasmine.github.io/) or [Mocha](http://visionmedia.github.io/mocha/) for unit testing.
2180
+
- Usa [Jasmine](http://jasmine.github.io/) oppure [Mocha](http://visionmedia.github.io/mocha/) per lo unit testing.
2180
2181
2181
-
*Perché?*: Both Jasmine and Mocha are widely used in the AngularJS community. Both are stable, well maintained, and provide robust testing features.
2182
+
*Perché?*: Sia Jasmine che Mocha sono largamente utilizzati nella comunità di AngularJS. Entrambi son stabili, ben manutenut e forniscono funzinalità solide per i test.
2182
2183
2183
-
Nota: When using Mocha, also consider choosing an assert library such as [Chai](http://chaijs.com).
2184
+
Nota: Usando Mocha, tieni in considerazione di usare anche una libreria di asserzione come [Chai](http://chaijs.com).
2184
2185
2185
-
### Test Runner
2186
+
### Esecutori di Test
2186
2187
2187
-
- Use [Karma](http://karma-runner.github.io) as a test runner.
2188
+
- Usa [Karma](http://karma-runner.github.io) come esecutore di test.
2188
2189
2189
-
*Perché?*: Karma is easy to configure to run once or automatically when you change your code.
2190
+
*Perché?*: Karma è facilmente configurabile per essere eseguito una sola volta o automaticamante quando cambia il tuo codice.
2190
2191
2191
-
*Perché?*: Karma hooks into your Continuous Integration process easily on its own or through Grunt or Gulp.
2192
+
*Perché?*: Karma si aggangia facilmente al tuo processo di Integrazione Continua da solo o attraverso Grunt o Gulp.
2192
2193
2193
-
*Perché?*: Some IDE's are beginning to integrate with Karma, such as [WebStorm](http://www.jetbrains.com/webstorm/) and [Visual Studio](http://visualstudiogallery.msdn.microsoft.com/02f47876-0e7a-4f6c-93f8-1af5d5189225).
2194
+
*Perché?*: Alcuni IDE cominciamo ad integrare Karma, come [WebStorm](http://www.jetbrains.com/webstorm/) e [Visual Studio](http://visualstudiogallery.msdn.microsoft.com/02f47876-0e7a-4f6c-93f8-1af5d5189225).
2194
2195
2195
-
*Perché?*: Karma works well with task automation leaders such as [Grunt](http://www.gruntjs.com) (with [grunt-karma](https://github.com/karma-runner/grunt-karma)) and [Gulp](http://www.gulpjs.com) (with [gulp-karma](https://github.com/lazd/gulp-karma)).
2196
+
*Perché?*: Karma lavora bene con leader di automazione di processo quali [Grunt](http://www.gruntjs.com) (con [grunt-karma](https://github.com/karma-runner/grunt-karma)) e [Gulp](http://www.gulpjs.com) (con [gulp-karma](https://github.com/lazd/gulp-karma)).
2196
2197
2197
-
### Stubbing and Spying
2198
+
### Stubbing e Spying
2198
2199
2199
-
- Use Sinon for stubbing and spying.
2200
+
- Usa Sinon per lo stubbing e spying.
2200
2201
2201
-
*Perché?*: Sinon works well with both Jasmine and Mocha and extends the stubbing and spying features they offer.
2202
+
*Perché?*: Sinon lavora bene sia con Jasmine che Mocha ed estende le funzionalità di stubbing e spying che questi offrono.
2202
2203
2203
-
*Perché?*: Sinon makes it easier to toggle between Jasmine and Mocha, if you want to try both.
2204
+
*Perché?*: Sinon rende pià semplice il passagio tra Jasmine e Mocha, nel caso voglia usarli entrambi.
2204
2205
2205
2206
### Headless Browser
2206
2207
2207
-
- Use [PhantomJS](http://phantomjs.org/) to run your tests on a server.
2208
+
- Usa [PhantomJS](http://phantomjs.org/) per eseguire i test su un server.
2208
2209
2209
-
*Perché?*: PhantomJS is a headless browser that helps run your tests without needing a "visual" browser. So you do not have to install Chrome, Safari, IE, or other browsers on your server.
2210
+
*Perché?*: PhantomJS è un headless browser che aiuta l'esecuzione di test senza la necessità di un browser "visuale". Quindi non devi installare Chrome, Safari, IE o altri browser sul server.
2210
2211
2211
-
Nota: You should still test on all browsers in your environment, as appropriate for your target audience.
2212
+
Nota: Dovresti in ogni caso testare tutti i browser del tuo ambiente, come appropriato per il pubblico che è il target.
2212
2213
2213
-
### Code Analysis
2214
+
### Analisi del codice
2214
2215
2215
-
- Run JSHint on your tests.
2216
+
- Esegui JSHint sui tuoi test.
2216
2217
2217
-
*Perché?*: Tests are code. JSHint can help identify code quality issues that may cause the test to work improperly.
2218
+
*Perché?*: I test sono codice. JSHint può aiutare ad identificare problemi di qualità del cosice che causano il'improprio funzionamento del test.
2218
2219
2219
-
### Alleviate Globals for JSHint Rules on Tests
2220
+
### Alleviare le regole sulle variabili globali di JSHint per i Test
2220
2221
2221
-
- Relax the rules on your test code to allow for common globals such as `describe`and`expect`.
2222
+
- Rilassa le regole sul codice dei test per consentendoli per variabili globali comuni quali `describe`ed`expect`.
2222
2223
2223
-
*Perché?*: Your tests are code and require the same attention and code quality rules as all of your production code. However, global variables used by the testing framework, for example, can be relaxed by including this in your test specs.
2224
+
*Perché?*: I tuoi test sono codice e richiedono al medesima attenzione e regole per la qualità del codice come tutto il resto del codice di produzione. Comunque, variabili globali usate dai framework di test, per esempio, possono essere rilassate includendole nelle specifiche dei test.
2224
2225
2225
2226
```javascript
2226
2227
/* global sinon, describe, it, afterEach, beforeEach, expect, inject */
0 commit comments