- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
var test = require('tape');
|
|
var isDate = require('../');
|
|
var hasToStringTag = require('has-tostringtag/shams')();
|
|
|
|
test('not Dates', function (t) {
|
|
// @ts-expect-error
|
|
t.notOk(isDate(), 'undefined is not Date');
|
|
t.notOk(isDate(null), 'null is not Date');
|
|
t.notOk(isDate(false), 'false is not Date');
|
|
t.notOk(isDate(true), 'true is not Date');
|
|
t.notOk(isDate(42), 'number is not Date');
|
|
t.notOk(isDate('foo'), 'string is not Date');
|
|
t.notOk(isDate([]), 'array is not Date');
|
|
t.notOk(isDate({}), 'object is not Date');
|
|
t.notOk(isDate(function () {}), 'function is not Date');
|
|
t.notOk(isDate(/a/g), 'regex literal is not Date');
|
|
t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date');
|
|
t.end();
|
|
});
|
|
|
|
test('@@toStringTag', { skip: !hasToStringTag }, function (t) {
|
|
var realDate = new Date();
|
|
/** @type {{ toString(): unknown; valueOf(): unknown; [Symbol.toStringTag]?: string; }} */
|
|
var fakeDate = {
|
|
toString: function () { return String(realDate); },
|
|
valueOf: function () { return realDate.getTime(); }
|
|
};
|
|
fakeDate[Symbol.toStringTag] = 'Date';
|
|
t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date');
|
|
t.end();
|
|
});
|
|
|
|
test('Dates', function (t) {
|
|
t.ok(isDate(new Date()), 'new Date() is Date');
|
|
t.end();
|
|
});
|