श्रेणियाँ, पैकेज और रिपॉज़िटरी खोजें

पैकेज विवरणv1.3.3

fake_async

निर्धारक परीक्षण के लिए समय-समय पर घटनाओं और माइक्रोटास्क के लिए नकली असिंक्रोनस इवेंट्स।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
1 क॰
लाइक
123
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add fake_async

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

fake_async एक Dart पैकेज है जिसका उपयोग असंगत कोड के निश्चित परीक्षण के लिए किया जाता है। यह विकासकर्ताओं को समय-समय पर, माइक्रोटास्क और अन्य एसिंक घटनाओं को नियंत्रित वातावरण में सिमुलेट करने की अनुमति देता है, जिससे परीक्षण परिणाम पूर्वानुमान और दोहराया जा सकता है। असंगत व्यवहार को फेक करके, यह वास्तविक समय के देरी पर निर्भरता को समाप्त करता है, जिससे परीक्षण तेज़ और अधिक विश्वसनीय होते हैं। फ्यूचर्स, स्ट्रीम्स या योजनाबद्ध कार्यों जैसे एसिंक ऑपरेशन वाले यूनिट और इंटीग्रेशन टेस्ट के लिए आदर्श है।

उपयोग

  • वास्तविक देरी के बिना एसिंक कोड का परीक्षण
  • टाइमर और माइक्रोटास्क का निर्माण करना
  • निर्णायक इकाई परीक्षण लिखना
  • प्रवाह और भविष्य के तर्क की पुष्टि करना
  • परीक्षण प्रदर्शन में सुधार करना

मुख्य विशेषताएँ

  • असिंक्रोनस संचालन के समय को नियंत्रित करता है
  • माइक्रोटास्क और टाइमर फेक्स का समर्थन करता है
  • सटीक परीक्षण निष्पादन सक्षम करता है
  • परीक्षण पैकेज के साथ एकीकृत होता है
  • असिंक मॉकिंग के लिए साफ़ API प्रदान करता है

इनके लिए उपयुक्त

  • डार्ट विकासकर्ता यूनिट परीक्षण लिख रहे हैं
  • परीक्षण विश्वसनीयता को प्राथमिकता देने वाली टीमें
  • जटिल एसिंक कार्यप्रवाह वाले प्रोजेक्ट्स
  • परीक्षण-ड्रिवन डेवलपमेंट प्रथाएँ
  • त्वरित परीक्षण की आवश्यकता वाले CI/CD पाइपलाइन

विचार योग्य बातें

  • अंत से अंत तक परीक्षण के लिए उपयुक्त नहीं
  • इवेंट लूप की समझ की आवश्यकता है
  • परीक्षण वातावरणों तक सीमित
  • उत्पादन में वास्तविक एसिंक व्यवहार की जगह नहीं लेता है
  • परीक्षण फ़ाइल में सही सेटअप की आवश्यकता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Dart CI OpenSSF Scorecard

What's here?

Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.

package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.

Packages

Package Description Issues Version
checks A framework for checking values against expectations and building custom expectations. issues pub package
fake_async Fake asynchronous events such as timers and microtasks for deterministic testing. issues pub package
matcher Support for specifying test expectations via an extensible Matcher class. Also includes a number of built-in Matcher implementations for common cases. issues pub package
test A full featured library for writing and running Dart tests across platforms. issues pub package
test_api The user facing API for structuring Dart tests and checking expectations. pub package
test_core A basic library for writing tests and running them on the VM. pub package
test_descriptor An API for defining and verifying files and directory structures. issues pub package
test_process Test processes: starting; validating stdout and stderr; checking exit code. issues pub package

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 2 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट